CWE-917: Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')
The product constructs all or part of an expression language (EL) statement in a framework such as a Java Server Page (JSP) using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended EL statement before it is executed.
Frameworks such as Java Server Page (JSP) allow a developer to insert executable expressions within otherwise-static content. When the developer is not aware of the executable nature of these expressions and/or does not disable them, then if an attacker can inject expressions, this could lead to code execution or other unexpected behaviors.
Consequences
- Confidentiality: Read Application Data
- Integrity: Execute Unauthorized Code or Commands
How to prevent it
- Architecture and Design: Avoid adding user-controlled data into an expression interpreter when possible.
- Implementation: If user-controlled data must be added to an expression interpreter, one or more of the following should be performed: Validate that the user input will not evaluate as an expression Encode the user input in a way that ensures it is not evaluated as an expression
- System Configuration, Operation: The framework or tooling might allow the developer to disable or deactivate the processing of EL expressions, such as setting the isELIgnored attribute for a JSP page to "true".
Recent advisories
- GHSA-pm35-fqvh-cq5g — n8n: Legacy Expression Evaluator Sanitizer Bypass Leads to Authenticated Code Execution
- GHSA-cfj9-2vgr-hpxp — Jenkins Script Security Plugin has a script security bypass vulnerability
- GHSA-3mfm-83xf-c92r — Handlebars.js has JavaScript Injection via AST Type Confusion by tampering @partial-block
- GHSA-67jx-r9pv-98rj — Traefik has Knative Ingress Rule Injection that Allows Host Restriction Bypass
- GHSA-8w3p-qh3x-6gjr — TYPO3 CMS vulnerable to Sensitive Information Disclosure via YAML Placeholder Expressions in Site Configuration
- CVE-2022-26134 — In affected versions of Confluence Server and Data Center, an OGNL injection vulnerability exists that would allow an unauthenticated attacker to execute…
- GHSA-v8j6-6c2r-r27c — Expression Language Injection in Apache Struts
- GHSA-6v73-fgf6-w5j7 — Spring Cloud Function Code Injection with a specially crafted SpEL as a routing expression
- GHSA-3gx9-37ww-9qw6 — Spring Cloud Gateway vulnerable to Code Injection when Gateway Actuator endpoint enabled, exposed, unsecured
- GHSA-7rjr-3q55-vv33 — Incomplete fix for Apache Log4j vulnerability
- GHSA-jfh8-c2jp-5v3q — Remote code injection in Log4j
- CVE-2021-26084 — In affected versions of Confluence Server and Data Center, an OGNL injection vulnerability exists that would allow an unauthenticated attacker to execute…
- CVE-2020-17530 — Remote code execution in Apache Struts
- CVE-2020-10199 — Nexus Repository Manager 3 - Remote Code Execution
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor