title: Possible limited path traversal vulnerabily in Apache Commons IO
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.
problem types: CWE-20 Improper Input Validation
affected:
{
product: Apache Commons IO
vendor: Apache Software Foundation
versions:
status: affected, version: Apache Commons IO 2.2
status: affected, version: Apache Commons IO 2.3
status: affected, version: Apache Commons IO 2.4
status: affected, version: Apache Commons IO 2.5
status: affected, version: Apache Commons IO 2.6
}
workarounds: 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.