An unknown Linux secret that turned SSRF to OS Command injection
An API endpoint that generated a PDF from a user-supplied URL parameter was vulnerable to server-side request forgery. The author escalated this into OS command injection using a Linux feature, though the text does not explain the mechanism.
Published on secureitmania.medium.com
secureITmania
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the PDF-generation endpoint passed the user-supplied URL into a shell or rendering pipeline without validating or restricting it, allowing both SSRF and command injection.
Impact
An attacker could make the server issue requests on their behalf and, per the author, execute arbitrary operating system commands, potentially compromising the application and its data.
What the attacker needed
Access to the API endpoint
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
A server-side request forgery (SSRF) bug lets an attacker make the server fetch a web address of their choosing, including internal addresses the attacker cannot reach directly. Here the server also turned the fetched page into a PDF, and the author found a way to turn that into running operating system commands on the server. The write-up is short and does not show the actual trick, so it is more of a teaser than a lesson.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.