Filename: org/owasp/webgoat/session/LessonTracker.java
Line: 226
CWE: 73 (External Control of File Name or Path)
This call to java.io.FileInputStream.!operator_javanewinit() contains a path manipulation flaw. The argument to the function is a filename constructed using untrusted input. If an attacker is allowed to specify all or part of the filename, it may be possible to gain unauthorized access to files on the server, including those outside the webroot, that would be normally be inaccessible to end users. The level of exposure depends on the effectiveness of input validation routines, if any. The first argument to !operator_javanewinit() contains tainted data from the variable fileName. The tainted data originated from earlier calls to javax.servlet.ServletRequest.getParameterValues, javax.servlet.ServletRequest.getParameterNames, and java.sql.Statement.executeQuery. Validate all untrusted input to ensure that it conforms to the expected format, using centralized data validation routines when possible. When using blocklists, be sure that the sanitizing routine performs a sufficient number of iterations to remove all instances of disallowed characters. References: CWE WASC