Rails Asset Pipeline Directory Traversal Vulnerability

By
Sooraj V Nair
Published on
20 Dec 2021
Vulnerability

Description:

Sprockets has an information leak vulnerability. 4.0.0.beta7 and lower, 3.7.1 and lower, 2.12.4 and lower are all affected. When the Sprockets server is used in production, specially constructed requests can be used to access files that exist on the filesystem outside of an application’s root directory. Users operating an affected release should upgrade or implement one of the workarounds as soon as possible.

Recommendation:

It is highly recommended to not use the Sprockets server in production and to instead precompile assets to disk and serve them through a server such as Nginx or via the static file middleware that ships with rails config.public_file_server.enabled = true.

Automated human-like penetration testing for your web apps & APIs
Teams using Beagle Security are set up in minutes, embrace release-based CI/CD security testing and save up to 65% with timely remediation of vulnerabilities. Sign up for a free account to see what it can do for you.

Written by
Sooraj V Nair
Sooraj V Nair
Cyber Security Engineer
Experience the Beagle Security platform
Unlock one full penetration test and all Advanced plan features free for 10 days
Find surface-level website security issues in under a minute
Free website security assessment
Experience the power of automated penetration testing & contextual reporting.