HighGHSA-pr3h-jjhj-573xCVE-2018-3760

Sprockets path traversal leads to information leak

Published 20 Jun 2018 · Updated 16 Feb 2024

Is your project on an affected sprockets?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Rails or Ruby apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected packages

sprocketsRubyGems
Affected
>=3.0.0 <3.7.2
Fixed in
3.7.2
Update to the fixed version for your release line, for example:bundle update --conservative sprockets # Gemfile: '>= 3.7.2'
sprocketsRubyGems
Affected
>=4.0.0.beta1 <4.0.0.beta8
Fixed in
4.0.0.beta8
Update to the fixed version for your release line, for example:bundle update --conservative sprockets # Gemfile: '>= 4.0.0.beta8'
sprocketsRubyGems
Affected
<2.12.5
Fixed in
2.12.5
Update to the fixed version for your release line, for example:bundle update --conservative sprockets # Gemfile: '>= 2.12.5'

Details

Specially crafted requests can be used to access files that exist 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.

Workaround:

In Rails applications, work around this issue, set config.assets.compile = false and config.public_file_server.enabled = true in an initializer and precompile the assets.

This work around will not be possible in all hosting environments and upgrading is advised.

Is GHSA-pr3h-jjhj-573x in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected sprockets, and gives you the command that fixes it.

More advisories for sprockets

  • MediumCVE-2014-7819sprockets vulnerable to Path Traversal · 24 Oct 2017
sprockets security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.