CVE-2021-31805 RCE bug in Apache Struts was finally patched

by chebbi abir

Apache addressed a critical flaw in Apache Struts RCE that was linked to a previous issue that was not properly fixed.

Apache Struts is an open-source web application framework for developing Java EE web applications.

 

The Apache Software Foundation urges organizations to address a vulnerability, tracked as CVE-2021-31805, affecting Struts versions ranging 2.0.0 to 2.5.29. An attacker could trigger this vulnerability to take control of an affected system.

According to the advisory published by Apache, the issue addressed by the organization is a critical flaw in Apache Struts linked to a previous OGNL Injection flaw (CVE-2020-17530) that wasn’t properly fixed.

The remote code execution flaw, tracked as CVE-2020-17530, resides in forced OGNL evaluation when evaluated on raw user input in tag attributes.

“Forced OGNL evaluation, when evaluated on raw user input in tag attributes, may lead to remote code execution – similar to S2-059.” reads the advisory published by the Apache Software Foundation“Some of the tag’s attributes could perform a double evaluation if a developer applied forced OGNL evaluation by using the %{...} syntax. Using forced OGNL evaluation on untrusted user input can lead to a Remote Code Execution and security degradation.”

Upon forcing OGNL evaluation using the %{…} syntax, tag’s attributes could perform double evaluation. Forced OGNL evaluation on untrusted input it is possible to achieve remote code execution.

“The fix issued for CVE-2020-17530 (S2-061) was incomplete. Still some of the tag’s attributes could perform a double evaluation if a developer applied forced OGNL evaluation by using the %{…} syntax. Using forced OGNL evaluation on untrusted user input can lead to a Remote Code Execution and security degradation.” reads the advisory published by Apache.

CISA also published a security advisory for Struts 2 recommending organizations to upgrade their installs.

Apache advisory recommends avoiding 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.

 

To read the original article:

https://securityaffairs.co/wordpress/130173/security/critical-apache-struts-rce-flaw.html

Top

Interdit de copier  ce contenu