Descrizione
Applications which accept user-supplied Spring Expression Language (SpEL) expressions
and evaluate them with a SimpleEvaluationContext may be vulnerable to the invocation of
constructors or methods through implicit type conversion, bypassing the restrictions on
constructor and method invocations.
Specifically, an application is vulnerable when all the following conditions are met:
The application accepts and evaluates untrusted or user-controlled SpEL expressions using
SimpleEvaluationContext .
The SimpleEvaluationContext uses its default type converter, or it is configured with a
TypeConverter or ConversionService that includes the default converters of
DefaultConversionService — for example, a DefaultConversionService or a
ConversionService populated via DefaultConversionService.addDefaultConverters() .
Tipo di vulnerabilità
CWE-917
Improper Neutralization of Special Elements used in an Expression Language Statement
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.
Impatto sui sistemi
| Ambito | Impatto |
| Riservatezza |
Leggere i dati dell’applicazione |
| Integrità |
Eseguire codice o comandi non autorizzati |
Come si previene
Architettura e progettazione
Avoid adding user-controlled data into an expression interpreter when possible.
Sviluppo
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
Configurazione del sistema · Esercizio
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.
Tutte le 204 CVE di tipo CWE-917, con andamento e prevenzione