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
Find website security issues in a flash
Improve your website's security posture with proactive vulnerability detection.
Free website security assessment