GitHub Advisoryadvisory · Maven

GHSA-gwrp-pvrq-jmwv Path Traversal and Improper Input Validation in Apache Commons IO

MEDIUM Published 2021-04-26 Modified 2024-02-14 Official page ↗
Aliases
CVE-2021-29425
Ecosystem
Maven
Packages
commons-io:commons-io, com.cosium.vet:vet, com.diamondq.common:common-thirdparty.jcasbin, com.liferay:com.liferay.sass.compiler.jsass, com.virjar:ratel-api, net.hasor:cobble-lang, org.apache.commons:commons-io, org.apache.servicemix.bundles:org.apache.servicemix.bundles.commons-io, org.checkerframework.annotatedlib:commons-io, org.smartboot.servlet:servlet-core
Severity
Moderate
CVSS vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:N
Weaknesses
CWE-20, CWE-22
Reviewed
2021-04-26

Affected packages

• Maven commons-io:commons-io: < 2.7 → fixed in 2.7 • Maven com.cosium.vet:vet: >= 1.0, <= 3.22 (no fix yet) • Maven com.diamondq.common:common-thirdparty.jcasbin: 1.4.0 (no fix yet) • Maven com.liferay:com.liferay.sass.compiler.jsass: 1.0.1 (no fix yet) • Maven com.virjar:ratel-api: >= 1.0.0, <= 1.3.6 (no fix yet) • Maven net.hasor:cobble-lang: >= 4.4.1, <= 4.6.2 (no fix yet) • Maven org.apache.commons:commons-io: 1.3.2 (no fix yet) • Maven org.apache.servicemix.bundles:org.apache.servicemix.bundles.commons-io: >= 1.4, <= 1.5 (no fix yet) • Maven org.checkerframework.annotatedlib:commons-io: >= 2.6, < 2.7 → fixed in 2.7 • Maven org.smartboot.servlet:servlet-core: >= 0.1.9, <= 0.6 (no fix yet)

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.

Related

Alias · CVE (1)

  • CVE-2021-29425 In Apache Commons IO before 2.7, When invoking the method FileNameUtils.normalize with an improper input string, like "//../foo", or… vulnerability

Weakness · CWE (2)

  • CWE-20 Improper Input Validation weakness
  • CWE-22 Improper Limitation of a Pathname to a Restricted Directory weakness

References