Apache Commons IO vulnerability

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.

Published 13 Apr 2021Updated 7 Oct 2026136 sources
CVSS 4.8 ✓ VERIFIED REFERENCE

What happened

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.

Affected versions

Apache Commons IO: Apache Commons IO 2.2; Apache Commons IO 2.3; Apache Commons IO 2.4; Apache Commons IO 2.5; Apache Commons IO 2.6 Fixed: See vendor advisory.

Why it matters

Review the vendor advisory and exposure of the affected product to determine operational impact.

Detection & mitigation

  • Apply vendor-provided updates or mitigations.
  • Review affected product exposure and access logs.

Public PoC references

RepositoryAuthorFirst seenReference
issues.apache.orgNVD reference2021-04-13Verified