GHSL-2023-235_GHSL-2023-237,GHSL-2023-251_GHSL-2023-252: Pre-authentication RCE in OpenMetadata - CVE-2024-28253, CVE-2024-28254, CVE-2024-28255, CVE-2024-28845, CVE-2024-28848
OpenMetadata contained multiple SpEL expression injection flaws in endpoints that validate filter conditions, and an authentication bypass using path parameters. An authenticated non-admin user could execute arbitrary system commands, and the bypass allowed unauthenticated access to some endpoints.
Originally disclosed on GitHub Security Lab
OpenMetadata is vulnerable to several SpEL Expression Injections and an authentication bypass leading to pre-authentication Remote Code Execution (RCE).
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 application evaluated user-supplied SpEL expressions with a standard evaluation context that allows access to Java classes, and the authentication filter used a substring match on the request path instead of an exact match.
Impact
An authenticated non-admin user could execute arbitrary system commands, and the authentication bypass could allow unauthenticated access to some endpoints, potentially leading to pre-authentication RCE.
What the attacker needed
A valid non-admin JWT token; network access to the OpenMetadata server
The fix
The issues were fixed in the December release.
How it was found
- Encode the command to be run using Base64.
- Create a SpEL expression that decodes and executes the command.
- Send the payload to the vulnerable endpoint with a valid non-admin JWT token.
- Verify that the command was executed on 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 report has not been written yet. The Original tab links to the source.
SpEL is a language used in Java Spring applications to evaluate expressions. If user input is passed directly to SpEL, an attacker can make the server run system commands. The authentication bypass tricked the server into thinking a protected path was actually a public one by adding extra path segments.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.