Cyber Risks · PortSwigger Research

Local file path manipulation (stored DOM-based)

Summary: PortSwigger describes stored DOM-based local file path manipulation, which occurs when user input is stored and later embedded into the DOM, then processed unsafely by a client-side script that uses that controllable data as the filename parameter to a file handling API. An attacker may construct a URL that, when visited by another user, causes that user's browser to open an arbitrary local file, with impact depending on whether the application reads from or writes to the opened file.

Bottom line: If the application reads the opened file, the attacker may retrieve its data; if it writes, the attacker may write specific data to a sensitive file such as an operating system configuration file - and PortSwigger notes static analysis alone can flag false positives, so the finding needs code and execution-path review.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related