Security
Mar 13, 2026

How Can I Protect My Web Application from Apache Struts CVEs?

How Can I Protect My Web Application from Apache Struts CVEs?

Give me the TL;DR
How Can I Protect My Web Application from Apache Struts CVEs?
For Qualys admins, NES for .NET directly resolves the EOL/Obsolete Software:   Microsoft .NET Version 6 Detected vulnerability, ensuring your systems remain secure and compliant. Fill out the form to get pricing details and learn more.

Apache Struts has long been a target for security researchers and attackers. Because the framework powers many production web applications, newly disclosed vulnerabilities are often exploited quickly.

History shows how serious these vulnerabilities can be. The 2017 Equifax breach, for example, was linked to an unpatched Apache Struts vulnerability that had already been publicly disclosed.

In 2026, protecting Struts-based applications requires a layered approach that includes patching, configuration hardening, and proactive monitoring.

Immediate Patching and Version Management

The most effective defense against Apache Struts vulnerabilities is staying on a supported version.

Recent disclosures, including CVE-2025-68493 and CVE-2024-53677, require specific upgrades to mitigate security risks.

Organizations should:

  • Upgrade to Struts 6.x or 7.x whenever possible
  • Ensure systems are running Struts 6.1.1 or later to address XML validation issues
  • Prefer the most recent Struts 7.x release for long-term security support

Upgrading ensures security fixes are applied and reduces exposure to newly discovered vulnerabilities.

Replace Deprecated Components

Some vulnerabilities require architectural changes, not just library updates.

For example, CVE-2024-53677 requires migrating from the deprecated FileUploadInterceptor to the newer ActionFileUploadInterceptor.

Simply upgrading the framework without changing the upload mechanism may leave applications exposed to path traversal and remote code execution risks.

Managing End-of-Life Versions

Some organizations continue running older Struts versions due to compatibility constraints or large legacy codebases.

When frameworks reach end-of-life (EOL), upstream maintainers typically stop releasing security patches. This can leave applications exposed to newly discovered vulnerabilities.

HeroDevs provides Never-Ending Support (NES) for end-of-life Apache Struts versions, delivering ongoing CVE remediation and drop-in security updates while teams plan upgrades or modernization.

Hardening OGNL and XML Parsing

Many Struts vulnerabilities involve Object-Graph Navigation Language (OGNL) injection.

Attackers may exploit OGNL expressions to execute system commands if the application is improperly configured.

Enable the OGNL Guard

Struts includes protections designed to limit which classes and methods can be accessed through OGNL expressions.

Ensure the OGNL Guard is enabled to restrict potentially dangerous operations.

Disable Development Mode

The devMode setting in struts.xml should always be disabled in production.

Development mode exposes debugging capabilities that attackers can use to inspect application internals.

Harden XML Parsing

Some recent vulnerabilities involve XML External Entity (XXE) attacks.

To reduce risk:

  • Disable external entities in your XML parser configuration
  • Configure the JVM to block external DTD loading

These controls prevent malicious XML payloads from accessing system resources.

Implement a Web Application Firewall (WAF)

A Web Application Firewall (WAF) can help block malicious requests before they reach your application.

Struts attacks often rely on malicious expressions embedded in HTTP headers or request bodies.

Effective WAF configuration should include:

  • Signature-based detection for OGNL expressions such as ${...} or %{...}
  • Inspection of suspicious HTTP headers like Content-Type and User-Agent
  • Monitoring of multipart/form-data uploads, which are commonly exploited in Struts vulnerabilities

While a WAF does not replace patching, it provides an important additional layer of defense.

Proactive Security Scanning

Security monitoring should be continuous.

Automated scanning tools can detect vulnerable dependencies and identify exploitable behavior before attackers do.

Software Composition Analysis (SCA)

SCA tools monitor open-source dependencies and alert teams when vulnerabilities are discovered.

Common tools include:

  • OWASP Dependency-Check
  • Snyk
  • Sonatype


These systems identify vulnerable components in your software stack, including transitive dependencies such as Commons FileUpload.

Dynamic Application Security Testing (DAST)

DAST tools test running applications by simulating real attack scenarios.

Security scanners such as Qualys WAS or Burp Suite can detect whether your application responds to known Struts exploit payloads.

Regular scanning helps validate that security fixes and configuration changes are working as intended.

Key Apache Struts CVEs to Address (2024–2026)

Several recent vulnerabilities highlight the importance of maintaining secure configurations and up-to-date versions.

These examples illustrate how configuration, patching, and dependency management must work together to maintain a secure application.

Security Requires Continuous Maintenance

Protecting a Struts-based application is not a one-time task.

Effective security requires:

  • Staying on supported versions
  • Applying patches quickly
  • Hardening framework configuration
  • Monitoring dependencies and runtime behavior

Apache Struts remains widely used because it is stable and capable. The key is ensuring that stability is paired with ongoing security maintenance.

HeroDevs provides Never-Ending Support (NES) for Apache Struts versions that have reached end-of-life, helping organizations maintain security and compliance while planning modernization deliberately.

Frequently Asked Questions

How quickly are Struts vulnerabilities exploited after disclosure?
In many cases, exploit attempts appear within days of public disclosure. This is why rapid patching and monitoring are critical.

Is upgrading the only way to fix Struts vulnerabilities?
Upgrading to a supported version is the preferred solution. For end-of-life versions, organizations must establish a supported remediation strategy.

What is the most common attack technique used against Struts?
Many attacks involve OGNL injection, which can allow attackers to execute arbitrary commands if protections are not properly configured.

Does a Web Application Firewall eliminate Struts risk?
No. A WAF can block many attack patterns, but it should be used alongside patching, secure configuration, and dependency monitoring.

How does HeroDevs help protect end-of-life Struts applications?
HeroDevs provides Never-Ending Support (NES), which includes ongoing security patches and supported releases for Struts versions that are no longer maintained upstream.

Table of Contents
Author
HeroDevs
Thought Leadership
Open Source Insights Delivered Monthly