CVEfocus › CVE database › CVE-2021-29425

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

CVSS 6.5 MediumEPSS 10.5% (higher than 96% of CVEs)Published 2021-04-13Updated 2026-10-07Assigner: apache

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.

CWE-20

What to do

Likely to be exploited: EPSS gives a 11% chance of exploitation in the next 30 days. Treat it as urgent if you run an affected version.

Fixed builds are available from Debian, Maven, Ubuntu: see the table below for the fixed version per release.

Maven, Ubuntu have not shipped a fix for every release yet.

Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.

curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \
  -H "Content-Type: text/plain" --data-binary @inventory.txt

Vendor status at a glance

7Fixed
7Fix pending
2Will not fix
6Not affected

Status by vendor and release

From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.

ReleasePackageStatusFixed versionAdvisory
Ubuntu 26.04commons-ioNot affected
vulnerable_code_not_present
Ubuntu 25.10commons-ioNot affected
vulnerable_code_not_present
Ubuntu 20.04commons-ioFixed2.6-2ubuntu0.20.04.1UBUNTU-CVE-2021-29425
Ubuntu 18.04commons-ioFixed2.6-2ubuntu0.18.04.1UBUNTU-CVE-2021-29425
Ubuntu 16.04commons-ioFix pendingUBUNTU-CVE-2021-29425
Ubuntu 14.04commons-ioFix pending2.4-2ubuntu0.1~esm1 (Ubuntu Pro)UBUNTU-CVE-2021-29425
Debian 14commons-ioFixed2.8.0-1DEBIAN-CVE-2021-29425
Debian 13commons-ioFixed2.8.0-1DEBIAN-CVE-2021-29425
Debian 12commons-ioFixed2.8.0-1DEBIAN-CVE-2021-29425
Red Hat Enterprise Linux 9apache-commons-ioNot affected
Red Hat Enterprise Linux 9apache-commons-io-javadocNot affected
Red Hat Enterprise Linux 8apache-commons-ioNot affected
Red Hat Enterprise Linux 8apache-commons-io-javadocNot affected
Red Hat Enterprise Linux 7apache-commons-ioWill not fix
Out of support scope
Red Hat Enterprise Linux 7apache-commons-io-javadocWill not fix
Out of support scope
Maven librarycom.cosium.vet:vetFix pendingGHSA-gwrp-pvrq-jmwv
Maven librarycom.virjar:ratel-apiFix pendingGHSA-gwrp-pvrq-jmwv
Maven librarycommons-io:commons-ioFixed2.7GHSA-gwrp-pvrq-jmwv
Maven librarynet.hasor:cobble-langFix pendingGHSA-gwrp-pvrq-jmwv
Maven libraryorg.apache.servicemix.bundles:org.apache.servicemix.bundles.commons-ioFix pendingGHSA-gwrp-pvrq-jmwv
Maven libraryorg.checkerframework.annotatedlib:commons-ioFixed2.7GHSA-gwrp-pvrq-jmwv
Maven libraryorg.smartboot.servlet:servlet-coreFix pendingGHSA-gwrp-pvrq-jmwv

What the vendor says

As published in the CVE record by apache, the CVE's assigner (usually the vendor). Check the vendor's advisory before acting.

Workaround: Neither the method in question (FileNameUtils.normalize) nor any methods, that invoke it, do actually access any files. There's only a string returned, from which a path can be constructed. In other words, a possible workaround would be not passing any unsafe input to FileNameUtils.normalize.

References

About this page

Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.