GHSL-2020-029: Server-Side template injection in Apache Syncope (RCE) - CVE-2020-1959
Apache Syncope used custom constraint validators that interpolated validated bean properties into error message templates, allowing Java EL expressions to be evaluated. An attacker could inject arbitrary Java EL expressions to run arbitrary code on the server with Syncope service account privileges.
Originally disclosed on GitHub Security Lab
A Server-Side Template Injection was identified in Apache Syncope enabling attackers to inject arbitrary Java EL expressions, leading to a Remote Code Execution (RCE) vulnerability.
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
The application passed user-controlled bean properties into a constraint violation message template that supports Java EL interpolation, so injected EL expressions were evaluated.
Impact
This issue may lead to Remote Code execution.
What the attacker needed
Ability to submit data that reaches a vulnerable validator
The fix
The issue was addressed in a commit; the report also recommends not including validated bean properties in error messages, sanitising them, disabling EL interpolation, or switching to a validator that does not interpolate EL by default.
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.
When a web application checks user input, it sometimes builds error messages that include the input. If those messages are later processed as code (here, Java Expression Language), an attacker can put code in the input and have it run on the server. This report shows that Apache Syncope did exactly that, letting an attacker run commands on 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.