Skip to content
RCE Advisory Intermediate CVE-2022-23463CVE-2022-23464

GHSL-2022-033_GHSL-2022-034: SpEL Injection in Nepxion/Discovery - CVE-2022-23463, CVE-2022-23464

The Discovery library evaluated a user-supplied expression with a full Spring expression context, so an attacker could reach Java classes and run commands on the server. A second issue built a URL from user-controlled host and protocol values and fetched it, which could let an attacker make the server request internal addresses.

jorgectf Follow

Originally disclosed on GitHub Security Lab

Nepxion/Discovery is vulnerable to SpEL Injection in discovery-commons and a potential SSRF in discovery-plugin-admin-center.

jorgectf, on GitHub Security Lab

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 expression evaluator used a full StandardEvaluationContext instead of a restricted one, and a URL was assembled from unvalidated user input before being fetched.

Impact

The first issue may lead to remote code execution, and the second may lead to information disclosure.

What the attacker needed

Network access to the endpoint; no authentication mentioned

The fix

The expression evaluator should use SimpleEvaluationContext so that references to Java types, constructors and beans are excluded.

How it was found

  1. Send a request to the validate-expression endpoint with an expression that calls a Java class and a validation value.
  2. The expression is passed through the resource and evaluated by the expression resolver.
  3. The command in the expression runs on the server, which can be confirmed by checking for the created file.

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.

The application takes a text expression from a web request and runs it as a small program. Because it uses a powerful evaluator, the text can also call Java classes, which lets someone run their own commands on the server. A second endpoint builds a web address from user input and fetches it, so the server can be tricked into visiting places the user cannot reach directly.

What is RCE?

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.

More by jorgectf

View all

34 more disclosed reports, best first.

More from GitHub Security Lab

View all

The newest disclosed reports for this program.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.