Cyber Risks · PortSwigger Research

Lab: File path traversal, validation of file extension with null byte bypass

Summary: PortSwigger's Web Security Academy lab describes a path traversal vulnerability in a product image display feature, where the application validates that a supplied filename ends with the expected file extension. The solution modifies the filename parameter to ../../../etc/passwd%00.png, and the null byte bypasses the extension check so the response returns the contents of the /etc/passwd file.

Bottom line: An extension check that a single null byte defeats leaves the server's /etc/passwd readable, and the same traversal pattern reaches configuration files and credentials stored anywhere the web process can read.

Read the original at PortSwigger Research ↗

Topics
Vulnerabilities & Patching
Related