Logo
-

Byte Open Security

(ByteOS Network)

Log In

Sign Up

ByteOS

Security
Vulnerability Details
Registries
Custom Views
Weaknesses
Attack Patterns
Filters & Tools
CWE-917:Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')
Weakness ID:917
Version:v4.17
Weakness Name:Improper Neutralization of Special Elements used in an Expression Language Statement ('Expression Language Injection')
Vulnerability Mapping:Allowed
Abstraction:Base
Structure:Simple
Status:Incomplete
Likelihood of Exploit:
DetailsContent HistoryObserved CVE ExamplesReports
▼Description

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.

▼Extended Description

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.

▼Alternate Terms
EL Injection

▼Relationships
Relevant to the view"Research Concepts - (1000)"
NatureMappingTypeIDName
ChildOfAllowed-with-ReviewC77Improper Neutralization of Special Elements used in a Command ('Command Injection')
PeerOfAllowedB1336Improper Neutralization of Special Elements Used in a Template Engine
Nature: ChildOf
Mapping: Allowed-with-Review
Type: Class
ID: 77
Name: Improper Neutralization of Special Elements used in a Command ('Command Injection')
Nature: PeerOf
Mapping: Allowed
Type: Base
ID: 1336
Name: Improper Neutralization of Special Elements Used in a Template Engine
▼Memberships
NatureMappingTypeIDName
MemberOfProhibitedC137Data Neutralization Issues
MemberOfProhibitedC1027OWASP Top Ten 2017 Category A1 - Injection
MemberOfProhibitedC1347OWASP Top Ten 2021 Category A03:2021 - Injection
MemberOfProhibitedC1409Comprehensive Categorization: Injection
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 137
Name: Data Neutralization Issues
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 1027
Name: OWASP Top Ten 2017 Category A1 - Injection
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 1347
Name: OWASP Top Ten 2021 Category A03:2021 - Injection
Nature: MemberOf
Mapping: Prohibited
Type:Category
ID: 1409
Name: Comprehensive Categorization: Injection
▼Tags
NatureMappingTypeIDName
MemberOfProhibitedBSBOSS-311Execute Unauthorized Code or Commands (impact)
MemberOfProhibitedBSBOSS-328Read Application Data (impact)
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-311
Name: Execute Unauthorized Code or Commands (impact)
Nature: MemberOf
Mapping: Prohibited
Type:BOSSView
ID: BOSS-328
Name: Read Application Data (impact)
▼Relevant To View
Relevant to the view"OWASP Top Ten (2021) - (1344)"
NatureMappingTypeIDName
MemberOfProhibitedC1347OWASP Top Ten 2021 Category A03:2021 - Injection
Nature: MemberOf
Mapping: Prohibited
Type: Category
ID: 1347
Name: OWASP Top Ten 2021 Category A03:2021 - Injection
Relevant to the view"Software Development - (699)"
NatureMappingTypeIDName
MemberOfProhibitedC137Data Neutralization Issues
Nature: MemberOf
Mapping: Prohibited
Type: Category
ID: 137
Name: Data Neutralization Issues
▼Background Detail

▼Common Consequences
ScopeLikelihoodImpactNote
ConfidentialityN/ARead Application Data
N/A
IntegrityN/AExecute Unauthorized Code or Commands
N/A
Scope: Confidentiality
Likelihood: N/A
Impact: Read Application Data
Note:
N/A
Scope: Integrity
Likelihood: N/A
Impact: Execute Unauthorized Code or Commands
Note:
N/A
▼Potential Mitigations
Phase:Architecture and Design
Mitigation ID:
Strategy:
Effectiveness:
Description:

Avoid adding user-controlled data into an expression interpreter when possible.

Note:


Phase:Implementation
Mitigation ID:
Strategy:
Effectiveness:
Description:

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
Note:


Phase:System Configuration, Operation
Mitigation ID:
Strategy:
Effectiveness:
Description:

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

Note:

▼Modes Of Introduction
Phase: Architecture and Design
Note:

N/A

Phase: Implementation
Note:

N/A

▼Applicable Platforms
Languages
Class: Java(Undetermined Prevalence)
▼Demonstrative Examples
▼Observed Examples
ReferenceDescription
CVE-2021-44228
Product does not neutralize ${xyz} style expressions, allowing remote code execution. (log4shell vulnerability in log4j)
Reference: CVE-2021-44228
Description:
Product does not neutralize ${xyz} style expressions, allowing remote code execution. (log4shell vulnerability in log4j)
▼Affected Resources
    ▼Functional Areas
      ▼Weakness Ordinalities
      OrdinalityDescription
      Primary
      N/A
      Ordinality: Primary
      Description:
      N/A
      ▼Detection Methods
      Automated Static Analysis
      Detection Method ID:DM-14
      Description:

      Automated static analysis, commonly referred to as Static Application Security Testing (SAST), can find some instances of this weakness by analyzing source code (or binary/compiled code) without having to execute it. Typically, this is done by building a model of data flow and control flow, then searching for potentially-vulnerable patterns that connect "sources" (origins of input) with "sinks" (destinations where the data interacts with external components, a lower layer such as the OS, etc.)

      Effectiveness:High
      Note:

      N/A

      ▼Vulnerability Mapping Notes
      Usage:Allowed
      Reason:Acceptable-Use
      Rationale:

      This CWE entry is at the Base level of abstraction, which is a preferred level of abstraction for mapping to the root causes of vulnerabilities.

      Comments:

      Carefully read both the name and description to ensure that this mapping is an appropriate fit. Do not try to 'force' a mapping to a lower-level Base/Variant simply to comply with this preferred level of abstraction.

      Suggestions:
      ▼Notes
      Maintenance

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

      N/A

      Relationship

      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.

      N/A

      ▼Taxonomy Mappings
      Taxonomy NameEntry IDFitEntry Name
      ▼Related Attack Patterns
      IDName
      ▼References
      Reference ID: REF-911
      Title: Expression Language Injection
      Author: Stefano Di Paola, Arshan Dabirsiaghi
      Section:
      Publication:
      Publisher:
      Edition:
      URL:https://mindedsecurity.com/wp-content/uploads/2020/10/ExpressionLanguageInjection.pdf
      URL Date:2023-04-07
      Day:12
      Month:09
      Year:2011
      Reference ID: REF-912
      Title: Remote Code with Expression Language Injection
      Author: Dan Amodio
      Section:
      Publication:
      Publisher:
      Edition:
      URL:http://danamodio.com/appsec/research/spring-remote-code-with-expression-language-injection/
      URL Date:2023-04-07
      Day:14
      Month:12
      Year:2012
      Reference ID: REF-1279
      Title: Neutralizing Your Inputs: A Log4Shell Weakness Story
      Author: CWE/CAPEC
      Section:
      Publication:
      Publisher:
      Edition:
      URL:https://medium.com/@CWE_CAPEC/neutralizing-your-inputs-a-log4shell-weakness-story-89954c8b25c9
      URL Date:
      Day:N/A
      Month:N/A
      Year:N/A
      Reference ID: REF-1280
      Title: Expression Language Injection
      Author: OWASP
      Section:
      Publication:
      Publisher:
      Edition:
      URL:https://owasp.org/www-community/vulnerabilities/Expression_Language_Injection
      URL Date:
      Day:N/A
      Month:N/A
      Year:N/A
      Details not found