# CVE-2021-29425: Possible limited path traversal vulnerabily in Apache Commons IO

> Attackers can access files in the parent directory via limited path traversal in Apache Commons IO when using FileNameUtils.normalize.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/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:** 13 Apr 2021
- **Updated:** 7 Oct 2026
- **Also known as:** CLEANSTART-2025-FS45495, CLEANSTART-2026-CT42491, CLSA-2026-1775003206, CLSA-2026-1783386138, CLSA-2026-1786520534, DEBIAN-CVE-2021-29425, DLA-2741-1, ECHO-826f-f91c-8e74, GHSA-gwrp-pvrq-jmwv, OESA-2021-1182, ROOT-APP-MAVEN-CVE-2021-29425, SUSE-SU-2021:1282-1, SUSE-SU-2021:1315-1, UBUNTU-CVE-2021-29425, USN-5095-1, openSUSE-SU-2021:0605-1, openSUSE-SU-2024:12099-1

## What is CVE-2021-29425?

CVE-2021-29425 is a medium-severity path traversal vulnerability in Debian Debian Linux, published on 13 Apr 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

In Apache Commons IO before 2.7, When invoking the method FileNameUtils.normalize with an improper input string, like "//../foo", or "\\..\foo", the result would be the same value, thus possibly providing access to files in the parent directory, but not further above (thus "limited" path traversal), if the calling code would use the result to construct a path value.

Weakness: CWE-22 (Improper Limitation of a Pathname to a Restricted Directory), CWE-20 (Improper Input Validation)

## Which versions are affected by CVE-2021-29425?

20 open source packages ship an affected version, including com.cosium.vet:vet, com.diamondq.common:common-thirdparty.jcasbin and com.liferay:com.liferay.sass.compiler.jsass. It affects 60 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `com.cosium.vet:vet` | Maven | From 1.0 to 3.22 | None |
| `com.cosium.vet:vet` | Maven | From 1.0 to 3.22 | None |
| `com.diamondq.common:common-thirdparty.jcasbin` | Maven | All versions | None |
| `com.diamondq.common:common-thirdparty.jcasbin` | Maven | All versions | None |
| `com.liferay:com.liferay.sass.compiler.jsass` | Maven | All versions | None |
| `com.liferay:com.liferay.sass.compiler.jsass` | Maven | All versions | None |
| `com.virjar:ratel-api` | Maven | From 1.0.0 to 1.3.6 | None |
| `com.virjar:ratel-api` | Maven | From 1.0.0 to 1.3.6 | None |
| `commons-io:commons-io` | Maven | All versions | 2.7 |
| `commons-io:commons-io` | Maven | All versions | 2.7 |
| `net.hasor:cobble-lang` | Maven | From 4.4.1 to 4.6.2 | None |
| `net.hasor:cobble-lang` | Maven | From 4.4.1 to 4.6.2 | None |
| `org.apache.commons:commons-io` | Maven | All versions | None |
| `org.apache.commons:commons-io` | Maven | All versions | None |
| `org.apache.servicemix.bundles:org.apache.servicemix.bundles.commons-io` | Maven | From 1.4 to 1.5 | None |
| `org.apache.servicemix.bundles:org.apache.servicemix.bundles.commons-io` | Maven | From 1.4 to 1.5 | None |
| `org.checkerframework.annotatedlib:commons-io` | Maven | From 2.6 | 2.7 |
| `org.checkerframework.annotatedlib:commons-io` | Maven | From 2.6 | 2.7 |
| `org.smartboot.servlet:servlet-core` | Maven | From 0.1.9 to 0.6 | None |
| `org.smartboot.servlet:servlet-core` | Maven | From 0.1.9 to 0.6 | None |
| `apache-commons-io` | SUSE:Linux Enterprise Module for Basesystem 15 SP2 | All versions | 2.6-3.3.1 |
| `apache-commons-io` | SUSE:Linux Enterprise Server 12 SP5 | All versions | 2.4-9.3.1 |
| `apache-commons-io` | SUSE:Linux Enterprise Server for SAP Applications 12 SP5 | All versions | 2.4-9.3.1 |
| `apache-commons-io` | SUSE:Linux Enterprise Software Development Kit 12 SP5 | All versions | 2.4-9.3.1 |
| `apache-commons-io` | openSUSE:Leap 15.2 | All versions | 2.6-lp152.2.3.1 |
| `apache-commons-io` | openSUSE:Tumbleweed | All versions | 2.11.0-2.1 |

Products: Apache Commons Io, Debian Debian Linux, Netapp Active Iq Unified Manager, Oracle Access Manager, Oracle Agile Engineering Data Management, Oracle Agile Product Lifecycle Management, Oracle Application Performance Management, Oracle Application Testing Suite, Oracle Banking Apis, Oracle Banking Digital Experience, Oracle Banking Enterprise Default Management, Oracle Banking Enterprise Default Managment, Oracle Banking Party Management, Oracle Banking Platform, Oracle Blockchain Platform, Oracle Commerce Guided Search, Oracle Communications Application Session Controller, Oracle Communications Billing and Revenue Management Elastic Charging Engine, Oracle Communications Cloud Native Core Network Repository Function, Oracle Communications Cloud Native Core Policy and 40 more.

## How do I fix CVE-2021-29425?

Upgrade to a fixed version.

## Is CVE-2021-29425 being exploited?

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

Public exploit code:

- https://github.com/arsalanraja987/java-cve-2021-29425-tika-xxe (github_poc): https://github.com/arsalanraja987/java-cve-2021-29425-tika-xxe
- https://github.com/shoucheng3/asf__commons-io_CVE-2021-29425_2-6 (github_poc): https://github.com/shoucheng3/asf__commons-io_CVE-2021-29425_2-6

## Other vulnerabilities in Debian Debian Linux

- [CVE-2024-47554](https://insights.sbomify.com/CVE-2024-47554/): Apache Commons IO: Possible denial of service attack on untrusted input to XmlStreamReader (medium 4.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-29425 and fix it if it is affected.

What it is: CVE-2021-29425 is a medium-severity path traversal vulnerability in Debian Debian Linux, published on 13 Apr 2021. 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-2021-29425 in the wild and no public exploit code.

Affected packages and fixed versions:
- com.cosium.vet:vet (Maven): affected from 1.0 up to 3.22; no fix listed
- com.cosium.vet:vet (Maven): affected from 1.0 up to 3.22; no fix listed
- com.diamondq.common:common-thirdparty.jcasbin (Maven): affected all versions; no fix listed
- com.diamondq.common:common-thirdparty.jcasbin (Maven): affected all versions; no fix listed
- com.liferay:com.liferay.sass.compiler.jsass (Maven): affected all versions; no fix listed
- com.liferay:com.liferay.sass.compiler.jsass (Maven): affected all versions; no fix listed
- com.virjar:ratel-api (Maven): affected from 1.0.0 up to 1.3.6; no fix listed
- com.virjar:ratel-api (Maven): affected from 1.0.0 up to 1.3.6; no fix listed
- commons-io:commons-io (Maven): affected all versions; fixed in 2.7
- commons-io:commons-io (Maven): affected all versions; fixed in 2.7
- net.hasor:cobble-lang (Maven): affected from 4.4.1 up to 4.6.2; no fix listed
- net.hasor:cobble-lang (Maven): affected from 4.4.1 up to 4.6.2; no fix listed

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

## Sources

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

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