# CVE-2014-3626: Path traversal in Grails by Pivotal

> A double decoding bug in the Grails Resource Plugin allows attackers to read arbitrary files when deployed on vulnerable JBoss containers.

- **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:** No
- **Published:** 19 Mar 2018
- **Updated:** 17 Sep 2024
- **Also known as:** GHSA-983j-49xj-hvgh

## What is CVE-2014-3626?

CVE-2014-3626 is a high-severity path traversal vulnerability in Dell EMC Grails by Pivotal, published on 19 Mar 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The Grails Resource Plugin often has to exchange URIs for resources with other internal components. Those other components will decode any URI passed to them. To protect against directory traversal the Grails Resource Plugin did the following: normalized the URI, checked the normalized URI did not step outside the appropriate root directory (e.g. the web application root), decoded the URI and checked that this did not introduce additional /../ (and similar) sequences. A bug was introduced where the Grails Resource Plugin before 1.2.13 returned the decoded version of the URI rather than the normalized version of the URI after the directory traversal check. This exposed a double decoding vulnerability. To address this issue, the Grails Resource Plugin now repeatedly decodes the URI up to three times or until decoding no longer changes the URI. If the decode limit of 3 is exceeded the URI is rejected. A side-effect of this is that the Grails Resource Plugin is unable to serve a resource that includes a '%' character in the full path to the resource. Not all environments are vulnerable because of the differences in URL resolving in different servlet containers. Applications deployed to Tomcat 8 and Jetty 9 were found not not be vulnerable, however applications deployed to JBoss EAP 6.3 / JBoss AS 7.4 and JBoss AS 7.1 were found to be vulnerable (other JBoss versions weren't tested). In certain cases JBoss returns JBoss specific vfs protocol urls from URL resolution methods (ClassLoader.getResources). The JBoss vfs URL protocol supports resolving any file on the filesystem. This made the directory traversal possible. There may be other containers, in addition to JBoss, on which this vulnerability is exposed.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory)

## Which versions are affected by CVE-2014-3626?

It affects 1 product.


Products: Grails Resources.

## How do I fix CVE-2014-3626?

No fix has been published for CVE-2014-3626 yet. Limit exposure of the affected software until one is available.

## Is CVE-2014-3626 being exploited?

There is no known exploitation of CVE-2014-3626 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2014-3626 and fix it if it is affected.

What it is: CVE-2014-3626 is a high-severity path traversal vulnerability in Dell EMC Grails by Pivotal, published on 19 Mar 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2014-3626 in the wild and no public exploit code.

Affected product: Dell EMC Grails by Pivotal. No package-level version data is available, so check the vendor advisory linked from the reference page.

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-2014-3626/ (Markdown: https://insights.sbomify.com/CVE-2014-3626/index.md)
```

## Sources

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

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