# CVE-2018-3760: Sprockets path traversal leads to information leak

> Attackers can read arbitrary files outside the application root via crafted requests when Sprockets is used in production mode.

- **Severity:** High 7.5 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 26 Jun 2018
- **Updated:** 16 Sep 2024
- **Also known as:** DEBIAN-CVE-2018-3760, DLA-1419-1, DSA-4242-1, GHSA-pr3h-jjhj-573x, RHSA-2018:2244, RHSA-2018:2245, SUSE-SU-2018:1994-1, SUSE-SU-2018:2176-1, SUSE-SU-2018:2217-1, UBUNTU-CVE-2018-3760, openSUSE-SU-2024:11354-1, openSUSE-SU-2024:11355-1, openSUSE-SU-2024:11906-1, openSUSE-SU-2024:13169-1, openSUSE-SU-2024:13170-1, openSUSE-SU-2024:14075-1, openSUSE-SU-2024:14177-1, openSUSE-SU-2025:15127-1, openSUSE-SU-2025:15128-1, openSUSE-SU-2026:10364-1, openSUSE-SU-2026:10365-1

## What is CVE-2018-3760?

CVE-2018-3760 is a high-severity path traversal vulnerability in Debian Debian Linux, published on 26 Jun 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

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.

Weakness: CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor), CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2018-3760?

6 open source packages ship an affected version, including sprockets. It affects 4 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `sprockets` | RubyGems | All versions | 2.12.5 |
| `sprockets` | RubyGems | All versions | 2.12.5 |
| `sprockets` | RubyGems | From 3.0.0 | 3.7.2 |
| `sprockets` | RubyGems | From 3.0.0 | 3.7.2 |
| `sprockets` | RubyGems | From 4.0.0.beta1 | 4.0.0.beta8 |
| `sprockets` | RubyGems | From 4.0.0.beta1 | 4.0.0.beta8 |
| `rh-ror42-rubygem-sprockets` | Red Hat:rhel_software_collections:3::el6 | All versions | 0:3.2.0-5.el6 |
| `rh-ror42-rubygem-sprockets-doc` | Red Hat:rhel_software_collections:3::el6 | All versions | 0:3.2.0-5.el6 |
| `rh-ror50-rubygem-sprockets` | Red Hat:rhel_software_collections:3::el6 | All versions | 0:3.7.1-2.el6 |
| `rh-ror50-rubygem-sprockets-doc` | Red Hat:rhel_software_collections:3::el6 | All versions | 0:3.7.1-2.el6 |
| `rh-ror42-rubygem-sprockets` | Red Hat:rhel_software_collections:3::el7 | All versions | 0:3.2.0-5.el7 |
| `rh-ror42-rubygem-sprockets-doc` | Red Hat:rhel_software_collections:3::el7 | All versions | 0:3.2.0-5.el7 |
| `rh-ror50-rubygem-sprockets` | Red Hat:rhel_software_collections:3::el7 | All versions | 0:3.7.1-2.el7 |
| `rh-ror50-rubygem-sprockets-doc` | Red Hat:rhel_software_collections:3::el7 | All versions | 0:3.7.1-2.el7 |
| `rubygem-sprockets` | SUSE:Linux Enterprise High Availability Extension 15 | All versions | 3.7.2-3.3.1 |
| `rubygem-sprockets-2_12` | SUSE:OpenStack Cloud 7 | All versions | 2.12.5-1.3.1 |
| `rubygem-sprockets-2_12` | SUSE:OpenStack Cloud Crowbar 8 | All versions | 2.12.5-1.4.1 |
| `ruby3.2-rubygem-sprockets` | openSUSE:Tumbleweed | All versions | 4.1.1-1.6 |
| `ruby3.2-rubygem-sprockets-3.7` | openSUSE:Tumbleweed | All versions | 3.7.2-1.20 |
| `rubygem-sprockets` | openSUSE:Tumbleweed | All versions | 4.0.3-1.1 |
| `rubygem-sprockets` | openSUSE:Tumbleweed | All versions | 4.2.1-1.5 |
| `rubygem-sprockets` | openSUSE:Tumbleweed | All versions | 4.2.1-1.7 |
| `rubygem-sprockets` | openSUSE:Tumbleweed | All versions | 4.2.1-1.9 |
| `rubygem-sprockets-3.7` | openSUSE:Tumbleweed | All versions | 3.7.3-1.1 |
| `rubygem-sprockets-3.7` | openSUSE:Tumbleweed | All versions | 3.7.5-1.3 |
| `rubygem-sprockets-3.7` | openSUSE:Tumbleweed | All versions | 3.7.5-1.5 |

Products: Debian Debian Linux, Redhat Cloudforms, Redhat Enterprise Linux, Sprockets Project Sprockets.

## How do I fix CVE-2018-3760?

Upgrade sprockets to a fixed version for your release line: 2.12.5, 3.7.2 or 4.0.0.beta8.

## Is CVE-2018-3760 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2018-3760 exists.

Public exploit code:

- Rails Asset Pipeline Directory Traversal Vulnerability  (github_poc): https://github.com/mpgn/CVE-2018-3760
- https://github.com/cyberharsh/Ruby-On-Rails-Path-Traversal-Vulnerability-CVE-2018-3760- (github_poc): https://github.com/cyberharsh/Ruby-On-Rails-Path-Traversal-Vulnerability-CVE-2018-3760-
- https://github.com/wudidwo/CVE-2018-3760-poc (github_poc): https://github.com/wudidwo/CVE-2018-3760-poc
- Vulhub rails/CVE-2018-3760: Ruby on Rails Sprockets Path Traversal (CVE-2018-3760), run with Isoloom (github_poc): https://github.com/CyberCTF/vulhub-rails-cve-2018-3760
- Ruby On Rails - Local File Inclusion (nuclei): http/cves/2018/CVE-2018-3760.yaml

## Other vulnerabilities in Debian Debian Linux

- [CVE-2015-3306](https://insights.sbomify.com/CVE-2015-3306/): ProFTPD Improper Access Control (critical 10.0, exploited in the wild)
- [CVE-2025-49113](https://insights.sbomify.com/CVE-2025-49113/): RoundCube Webmail Deserialization of Untrusted Data (critical 9.9, exploited in the wild)
- [CVE-2026-24061](https://insights.sbomify.com/CVE-2026-24061/): GNU InetUtils Argument Injection (critical 9.8, exploited in the wild)
- [CVE-2025-39682](https://insights.sbomify.com/CVE-2025-39682/): Linux Kernel Improper Check for Unusual or Exceptional Conditions (critical 9.8, exploited in the wild)
- [CVE-2024-9680](https://insights.sbomify.com/CVE-2024-9680/): Mozilla Firefox Use-After-Free (critical 9.8, exploited in the wild)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-3760 and fix it if it is affected.

What it is: CVE-2018-3760 is a high-severity path traversal vulnerability in Debian Debian Linux, published on 26 Jun 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2018-3760 exists.

Affected packages and fixed versions:
- sprockets (RubyGems): affected all versions; fixed in 2.12.5
- sprockets (RubyGems): affected all versions; fixed in 2.12.5
- sprockets (RubyGems): affected from 3.0.0; fixed in 3.7.2
- sprockets (RubyGems): affected from 3.0.0; fixed in 3.7.2
- sprockets (RubyGems): affected from 4.0.0.beta1; fixed in 4.0.0.beta8
- sprockets (RubyGems): affected from 4.0.0.beta1; fixed in 4.0.0.beta8

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2018-3760/ (Markdown: https://insights.sbomify.com/CVE-2018-3760/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2018-3760
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2018-3760
- OSV: https://osv.dev/vulnerability/CVE-2018-3760

---
From sbomify Insights: https://insights.sbomify.com/CVE-2018-3760/
Summaries are generated and may contain mistakes; the official description above is the record.
