Apache Batik DefaultScriptSecurity Server-Side Request Forgery Remote Code Execution Vulnerability
Apache Batik's DefaultScriptSecurity class fails to properly validate a URI before accessing resources, allowing an attacker to trigger server-side request forgery and potentially execute arbitrary code in the context of the current process.
Originally disclosed on Zero Day Initiative
This vulnerability allows remote attackers to execute arbitrary code on affected installations of Apache Batik. Interaction with this library is required to exploit this vulnerability but attack vectors may vary depending on the implementation.
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 report has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely, the DefaultScriptSecurity class does not adequately validate the URI before allowing access to external resources, enabling SSRF and subsequent code execution.
Impact
An attacker could execute arbitrary code on the server, but interaction with the library is required and attack vectors may vary.
What the attacker needed
Interaction with the library; attacker can supply a crafted URI
The fix
Apache has issued an update to correct this vulnerability.
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 report has not been written yet. The Original tab links to the source.
Apache Batik is a library for handling SVG images. A security check that is supposed to stop scripts from loading external resources can be bypassed, so an attacker can make the server fetch a URL of their choosing. This can lead to the attacker running their own code on the server.
What is SSRF?
The server can be made to fetch an address the attacker chooses, reaching internal services, cloud metadata or other customers' data.