Katalog CWE

CWE-917 · Słabość

Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')

Abstrakcja
Bazowa
Status
Niekompletny
Dodano
15 lutego 2013
Ostatnia zmiana
11 grudnia 2025

Podatności CVE z tą słabościąPełny wpis na cwe.mitre.org ↗

Opis

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.

Inne nazwy

EL Injection

Skutki

  • Confidentiality

    Read Application Data

  • Integrity

    Execute Unauthorized Code or Commands

Zapobieganie

  • 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".

Przykłady podatności

Słabość nadrzędna

Pokrewna

Kiedy powstaje

Dotyczy

Java

Uwagi

The interrelationships and differences between CWE-917 and CWE-1336 need to be further clarified.

In certain versions of Spring 3.0.5 and earlier, there was a vulnerability (CVE-2011-2730) in which Expression Language tags would be evaluated twice, which effectively exposed any application to EL injection. However, even for later versions, this weakness is still possible depending on configuration.

Źródła

  1. Expression Language Injection — Stefano Di Paola, Arshan Dabirsiaghi, 2011
  2. Remote Code with Expression Language Injection — Dan Amodio, 2012
  3. Neutralizing Your Inputs: A Log4Shell Weakness Story — CWE/CAPEC
  4. Expression Language Injection — OWASP

Wpis z katalogu CWE 4.20.