CVE-2020-17530: Remote Code Execution in Apache Struts

Summary

09/02/2022
Yes i
Critical
9.8

CVE-2020-17530: Remote code execution in Apache Struts. Affects org.apache.struts:struts2-core versions >= 2.0.0, < 2.5.26. Fixed in 2.5.26. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Apache Struts is a popular open-source framework for developing Java web applications. It provides a set of reusable components and a Model-View-Controller (MVC) architecture to simplify the development process. The struts2-core package is a core component of Apache Struts, responsible for handling various functionalities such as request processing, tag libraries, and form handling. Unfortunately, a vulnerability has been discovered in the package that allows for remote code execution.

Vulnerability Detail

The vulnerability, identified as CVE-2020-17530, arises from forced Object-Graph Navigation Language (OGNL) evaluation. When user input is directly evaluated in tag attributes without proper sanitization, an attacker can inject malicious OGNL expressions, leading to remote code execution. This can have severe consequences, as an attacker can execute arbitrary commands on the server, potentially compromising sensitive data, modifying or deleting files, or even taking control of the entire system.

How To Fix

Latest published version: 7.4.0 as of 22 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.5.26

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to a patched version is not immediately feasible, a temporary workaround can be implemented. One possible workaround is to disable the evaluation of OGNL expressions in tag attributes. This can be achieved by modifying the Struts configuration file (struts.xml) and setting the 'struts.ognl.allowStaticMethodAccess' property to 'false'. This prevents the execution of OGNL expressions in tag attributes, mitigating the risk of remote code execution. However, it is important to note that this workaround may impact the functionality of certain features that rely on OGNL expressions.

Conclusion

The CVE-2020-17530 vulnerability in Apache Struts' struts2-core package poses a critical risk of remote code execution. It is crucial to promptly upgrade to a patched version, such as 2.5.26, to mitigate this vulnerability. Alternatively, a temporary workaround can be implemented by disabling OGNL evaluation in tag attributes. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for org.apache.struts:struts2-core →

Share this vulnerability

FAQ

Apache Struts is an open-source framework for developing Java web applications. It provides a set of reusable components and follows the Model-View-Controller (MVC) architectural pattern.

The struts2-core package is a core component of Apache Struts. It handles various functionalities such as request processing, tag libraries, and form handling.

Forced OGNL evaluation refers to the evaluation of Object-Graph Navigation Language (OGNL) expressions on raw user input without proper sanitization. This can lead to the execution of arbitrary code.

The vulnerability allows for remote code execution, which means an attacker can execute arbitrary commands on the server. This can result in data breaches, unauthorized access, modification or deletion of files, and even complete system compromise.

To fix this vulnerability, you should upgrade the struts2-core package to version 2.5.26 or a subsequent release that includes the fix. This ensures that the OGNL evaluation is properly handled and prevents the execution of malicious code.

Related vulnerabilities

Recent vulnerabilities recorded for org.apache.struts:struts2-core.

How To Fix

Latest published version: 7.4.0 as of 22 Oct 2026

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.5.26

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback