cbcvebase.
CVE-2018-3760
published 2018-06-26

CVE-2018-3760: There is an information leak vulnerability in Sprockets. Versions Affected: 4.0.0.beta7 and lower, 3.7.1 and lower, 2.12.4 and lower. Specially crafted…

PriorityP181high7.5CVSS 3.0
AVNACLPRNUINSUCHINAN
ITWEXPLOITVulnCheck KEV
Exploited in the wild
EPSS
26.72%
97.8th percentile
There is an information leak vulnerability in Sprockets. Versions Affected: 4.0.0.beta7 and lower, 3.7.1 and lower, 2.12.4 and lower. Specially crafted requests can be used to access files that exists on the filesystem that is outside an application's root directory, when the Sprockets server is used in production. All users running an affected release should either upgrade or use one of the work arounds immediately.

Affected

18 ranges
VendorProductVersion rangeFixed in
debiandebian_linux
debianruby-sprockets< ruby-sprockets 3.7.0-1.1 (bookworm)ruby-sprockets 3.7.0-1.1 (bookworm)
hackeronesprockets
redhatcloudforms
redhatcloudforms
redhatenterprise_linux
redhatenterprise_linux
redhatenterprise_linux
redhatenterprise_linux
redhatenterprise_linux
redhatenterprise_linux
redhatenterprise_linux
sprockets_projectsprockets
sprockets_projectsprockets>= 0 < 2.12.52.12.5
sprockets_projectsprockets2.0.0 – 2.12.4
sprockets_projectsprockets>= 3.0.0 < 3.7.23.7.2
sprockets_projectsprockets3.0.0 – 3.7.1
sprockets_projectsprockets>= 4.0.0.beta1 < 4.0.0.beta84.0.0.beta8

Detection & IOCsextracted from sources · hover to see the quote

urlGET /assets/file:%2f%2f/etc/passwd HTTP/1.1
urlGET /assets/file:%2f%2f{{path}}/%252e%252e/%252e%252e/%252e%252e/%252e%252e/%252e%252e/%252e%252e/etc/passwd HTTP/1.1
command%252e%252e/
path/assets/
yara
regex: root:.*:0:0:
  • Detect double-URL-encoded path traversal sequences (%252e%252e) in HTTP requests targeting the /assets/ endpoint, which indicates secondary decoding exploitation of Sprockets.
  • Look for requests to /assets/ containing 'file:%2f%2f' or 'file://' URI schemes, which are used to directly reference filesystem paths outside the application root.
  • Monitor HTTP responses for the error string '/etc/passwd is no longer under a load path:' in the response body, which leaks the server's load path and can be used as a second-stage extractor for further traversal.
  • The vulnerable function is forbidden_request?() in sprockets/server.rb; monitor for path traversal bypass of this function via double-encoded dot-dot sequences.
  • Successful exploitation returns HTTP 200 with /etc/passwd content (root:.*:0:0: pattern); alert on 200 responses to /assets/ requests containing traversal sequences.
  • ·The path traversal via Sprockets is only exploitable in production when config.assets.compile = true; this is NOT the default for production Rails apps, limiting exposure.
  • ·Workaround (not a fix): set config.assets.compile = false and config.public_file_server.enabled = true in an initializer and precompile assets. Note this workaround is not possible in all hosting environments.

CVSS provenance

nvdv3.07.5HIGHCVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
nvdv2.05.0MEDIUMAV:N/AC:L/Au:N/C:P/I:N/A:N
osv7.5HIGH
vulncheck7.5HIGH
vendor_debian7.5HIGH
vendor_redhat7.5HIGH
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.