An image-fetching feature accepted a URL and returned Base64. Allowing a local-file scheme turned that convenience into a server-side file read.

The boundary

The API accepted file:// through its image parameter. Reading harmless system-identification files confirmed that the returned data came from the application server’s filesystem.

The filter gap

The filter and the fetcher interpreted the same input differently. Their disagreement allowed the request to cross the intended boundary.

Confirmed impact, stated carefully

The confirmed result was arbitrary local file read. A configuration file produced a non-empty response; its contents were not decoded. Valid credentials, database access, and further compromise were not established.

The lesson

Restrict supported protocols, validate normalized destinations, repeat checks after redirects, and verify that fetched content is an image. Encoding a response does not protect its contents.

DISCLOSURE NOTE

The organization is anonymized. The issue was fixed before publication.

FROM THE AUTHOR’S NOTEBOOK

This page is a concise companion to the original report.

Read the full report on Medium
Back to the notebook