Description Summary The software uses external input to construct a pathname that
should be within a restricted directory, but it does not properly sanitize
absolute path sequences such as "/abs/path" that can resolve to a location that
is outside of that directory.
Extended Description This allows attackers to traverse the file system to access files or directories that are outside of the restricted directory. Example 1 In the example below, the path to a dictionary file is read from a system property and used to initialize a File object without having been sanitized. Ideally, the path should be resolved relative to some kind of application or user home directory. (Bad Code) Java String filename =
System.getProperty("com.domain.application.dictionaryFile"); File dictionaryFile = new File(filename);
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Page Last Updated:
October 29, 2009
|
|
CWE is a Software Assurance strategic initiative sponsored by the National Cyber Security Division of the U.S. Department of Homeland Security. This Web site is hosted by The MITRE Corporation. Contact cwe@mitre.org for more information. |
|||
