Apache Log4j2 Remote Code Execution
CVE-2021-44228 is a critical-severity improper neutralization of special elements used in an expression language statement vulnerability in Apache Log4j2 from Apache, with a CVSS 3.1 base score of 10.0 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, without any action from a user. The record lists version log4j-core* as the first without the flaw, so updating Apache Log4j2 to that release or later removes the exposure. CISA added it to the Known Exploited Vulnerabilities catalogue on December 10, 2021, which means attacks have been observed in the wild, including in ransomware campaigns.
Attackers are already exploiting this vulnerability, according to CISA.
What to do
- Update Apache Log4j2 to log4j-core* or a later version.
- Update 6bk1602-0aa12-0tp0 Firmware to 2.7.0 or a later version.
- Update 6bk1602-0aa22-0tp0 Firmware to 2.7.0 or a later version.
- CISA's required action: For all affected software assets for which updates exist, the only acceptable remediation actions are: 1) Apply updates; OR 2) remove affected assets from agency networks. Temporary mitigations using one of the measures provided at https://www.cisa.gov/uscert/ed-22-02-apache-log4j-recommended-mitigation-measures are only acceptable until updates are available.
- Read the advisory on packetstormsecurity.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Apache | Apache Log4j2 | 2.0-beta9 up to, but not including, log4j-core* | log4j-core* |
| Siemens | 6bk1602-0aa12-0tp0 Firmware | before 2.7.0 | 2.7.0 |
| Siemens | 6bk1602-0aa22-0tp0 Firmware | before 2.7.0 | 2.7.0 |
| Siemens | 6bk1602-0aa32-0tp0 Firmware | before 2.7.0 | 2.7.0 |
| Siemens | 6bk1602-0aa42-0tp0 Firmware | before 2.7.0 | 2.7.0 |
| Siemens | 6bk1602-0aa52-0tp0 Firmware | before 2.7.0 | 2.7.0 |
| Apache | Log4j | 2.0.1 up to, but not including, 2.3.1; 2.4.0 up to, but not including, 2.12.2; 2.13.0 up to, but not including, 2.15.0; 2.0 | 2.3.1, 2.12.2, 2.15.0 |
| Siemens | Sppa-t3000 Ses3000 Firmware | Not specified in the record | Not stated |
| Siemens | Capital | before 2019.1; 2019.1 | 2019.1 |
| Siemens | Comos | before 10.4.2 | 10.4.2 |
| Siemens | Desigo Cc Advanced Reports | 3.0; 4.0; 4.1; 4.2; 5.0; 5.1 | Not stated |
| Siemens | Desigo Cc Info Center | 5.0; 5.1 | Not stated |
| Siemens | E-car Operation Center | before 2021-12-13 | 2021-12-13 |
| Siemens | Energy Engage | 3.1 | Not stated |
| Siemens | Energyip | 8.5; 8.6; 8.7; 9.0 | Not stated |
| Siemens | Energyip Prepay | before 3.8.0.12 | 3.8.0.12 |
| Siemens | Gma-manager | before 8.6.2j-398 | 8.6.2j-398 |
| Siemens | Head-end System Universal Device Integration System | Not specified in the record | Not stated |
| Siemens | Industrial Edge Management | Not specified in the record | Not stated |
| Siemens | Industrial Edge Management Hub | before 2021-12-13 | 2021-12-13 |
| Siemens | Logo! Soft Comfort | Not specified in the record | Not stated |
| Siemens | Mendix | Not specified in the record | Not stated |
| Siemens | Mindsphere | before 2021-12-16 | 2021-12-16 |
| Siemens | Navigator | before 2021-12-13 | 2021-12-13 |
| Siemens | Nx | Not specified in the record | Not stated |
Version data comes from the organisation that assigned the CVE; 35 further products are omitted here. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- NoneNo action by a victim is required.
- Scope
- ChangedThe attack can reach beyond the vulnerable component into other systems.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 10.0 | Critical | NVD |
| CVSS 3.1 | 10.0 | Critical | CISA (ADP) |
| CVSS 2.0 | 9.3 | High | NVD |
Official description
Apache Log4j2 2.0-beta9 through 2.15.0 (excluding security releases 2.12.2, 2.12.3, and 2.3.1) JNDI features used in configuration, log messages, and parameters do not protect against attacker controlled LDAP and other JNDI related endpoints. An attacker who can control log messages or log message parameters can execute arbitrary code loaded from LDAP servers when message lookup substitution is enabled. From log4j 2.15.0, this behavior has been disabled by default. From version 2.16.0 (along with 2.12.2, 2.12.3, and 2.3.1), this functionality has been completely removed. Note that this vulnerability is specific to log4j-core and does not affect log4net, log4cxx, or other Apache Logging Services projects.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: 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.
How developers prevent this class of flaw
- Avoid adding user-controlled data into an expression interpreter when possible.
- 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
- 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.
Timeline
- CVE record published.
- Added to CISA's Known Exploited Vulnerabilities catalogue.
- Deadline for US federal agencies to remediate, set by CISA.
- CISA published its SSVC assessment (exploitation: active, automatable: yes, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Advisories
- packetstormsecurity.com/files/165260/VMware-Security-Advisory-2021-0028.htmlThird Party Advisory, VDB Entry
- packetstormsecurity.com/files/165371/VMware-Security-Advisory-2021-0028.4.htmlExploit, Third Party Advisory, VDB Entry
- logging.apache.org/log4j/2.x/security.htmlRelease Notes
- msrc-blog.microsoft.com/2021/12/11/microsofts-response-to-cve-2021-44228-apache-log4j2/Third Party Advisory
- psirt.global.sonicwall.com/vuln-detail/SNWLID-2021-0032Third Party Advisory
Patches and release notes
- openwall.com/lists/oss-security/2021/12/10/1Mailing List, Mitigation, Third Party Advisory
- openwall.com/lists/oss-security/2021/12/10/2Mailing List, Mitigation, Third Party Advisory
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/M5CSVUNV4HWZZXGOKNSK…Release Notes
- lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VU57UJDCFIASIO35GC55…Release Notes
- oracle.com/security-alerts/cpuapr2022.htmlThird Party Advisory
- oracle.com/security-alerts/cpujan2022.htmlThird Party Advisory
Third-party and government advisories
- packetstormsecurity.com/files/165225/Apache-Log4j2-2.14.1-Remote-Code-Execution.htmlThird Party Advisory, VDB Entry
- packetstormsecurity.com/files/165281/Log4j2-Log4Shell-Regexes.htmlThird Party Advisory, VDB Entry
- packetstormsecurity.com/files/165282/Log4j-Payload-Generator.htmlThird Party Advisory, VDB Entry
- packetstormsecurity.com/files/165306/L4sh-Log4j-Remote-Code-Execution.htmlThird Party Advisory, VDB Entry
- packetstormsecurity.com/files/165307/Log4j-Remote-Code-Execution-Word-Bypassing.htmlThird Party Advisory, VDB Entry
- packetstormsecurity.com/files/167794/Open-Xchange-App-Suite-7.10.x-Cross-Site-Scripting-Command-Injection.htmlThird Party Advisory, VDB Entry
- packetstormsecurity.com/files/171626/AD-Manager-Plus-7122-Remote-Code-Execution.htmlThird Party Advisory, VDB Entry
- seclists.org/fulldisclosure/2022/Jul/11Mailing List, Third Party Advisory
- seclists.org/fulldisclosure/2022/Mar/23Mailing List, Third Party Advisory
- openwall.com/lists/oss-security/2021/12/10/3Mailing List, Third Party Advisory
- openwall.com/lists/oss-security/2021/12/13/1Mailing List, Third Party Advisory
- openwall.com/lists/oss-security/2021/12/13/2Mailing List, Third Party Advisory
- openwall.com/lists/oss-security/2021/12/14/4Mailing List, Third Party Advisory
- openwall.com/lists/oss-security/2021/12/15/3Mailing List, Third Party Advisory
- cert-portal.siemens.com/productcert/pdf/ssa-397453.pdfThird Party Advisory
Technical write-ups (may include proof of concept)
- packetstormsecurity.com/files/165261/Apache-Log4j2-2.14.1-Information-Disclosure.htmlExploit, Third Party Advisory, VDB Entry
- packetstormsecurity.com/files/165270/Apache-Log4j2-2.14.1-Remote-Code-Execution.htmlExploit, Third Party Advisory, VDB Entry
- packetstormsecurity.com/files/165532/Log4Shell-HTTP-Header-Injection.htmlExploit, Third Party Advisory, VDB Entry
- packetstormsecurity.com/files/165642/VMware-vCenter-Server-Unauthenticated-Log4Shell-JNDI-Injection-Remote-Co…Exploit, Third Party Advisory, VDB Entry
- packetstormsecurity.com/files/165673/UniFi-Network-Application-Unauthenticated-Log4Shell-Remote-Code-Executio…Exploit, Third Party Advisory, VDB Entry
- packetstormsecurity.com/files/167917/MobileIron-Log4Shell-Remote-Command-Execution.htmlExploit, Third Party Advisory, VDB Entry
- seclists.org/fulldisclosure/2022/Dec/2Exploit, Mailing List, Third Party Advisory
- github.com/nu11secur1ty/CVE-mitre/tree/main/CVE-2021-44228Exploit, Third Party Advisory
- nu11secur1ty.com/2021/12/cve-2021-44228.htmlExploit, Third Party Advisory
Recent Improper Neutralization of Special Elements used in an Expression Language Statement vulnerabilities
- 9.8 Critical severity
- 9.8 Critical severity
Apache Struts Remote Code Execution Exploited
- 8.8 High severity
- 8.8 High severity
Spotted an error? Tell us.