CVE-2017–5638 — “Jakarta Multipart Parser” RCE (S2–
The Jakarta Multipart parser in Apache Struts mishandled exceptions and error messages during file uploads, allowing an attacker to send malicious OGNL expressions in the Content-Type header that the server then executed. This enabled remote code execution on vulnerable Struts instances.
Published on medium.com
Apache Struts is an open-source framework that is used to build Java web applications. Apache Struts uses Object Graph Navigation Language (OGNL) for most of it’s processes.
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
The developers did not treat all external input as untrusted, allowing unsanitised input to be evaluated as code in an expression language evaluator.
Impact
This could lead to remote code execution, and it was used in the Equifax breach affecting 147 million people.
What the attacker needed
Vulnerable Apache Struts version; network access to the server
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.
Apache Struts is a tool for building Java websites. It used a feature called OGNL to process some input, but it did not properly check the Content-Type header during file uploads. An attacker could put special code in that header, and the server would run it, giving the attacker control of the server.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.