CVE-2020-9484: Apache Tomcat Remote Code Execution Vulnerability Alert

Recently, Apache Tomcat issued a notice saying that a remote code execution vulnerability (CVE-2020-9484) originating from a persistent session was fixed. To exploit this vulnerability, an attacker needs to meet the following four conditions at the same time:

  • an attacker is able to control the contents and name of a file on the server; and
  • the server is configured to use the PersistenceManager with a FileStore; and
  • the PersistenceManager is configured with sessionAttributeValueClassNameFilter="null" (the default unless a SecurityManager is used) or a sufficiently lax filter to allow the attacker provided object to be deserialized; and
  • the attacker knows the relative file path from the storage location used by FileStore to the file the attacker has control over;

When an attacker satisfies the above four conditions at the same time, an attacker can send a maliciously constructed request to cause a deserialization code execution vulnerability.Apache Tomcat 9

Affected version

  • Apache Tomcat 10.x < 10.0.0-M5
  • Apache Tomcat 9.x < 9.0.35
  • Apache Tomcat 8.x < 8.5.55
  • Apache Tomcat 7.x < 7.0.104

Unaffected version

  • Apache Tomcat 10.x >= 10.0.0-M5
  • Apache Tomcat 9.x >= 9.0.35
  • Apache Tomcat 8.x >= 8.5.55
  • Apache Tomcat 7.x >= 7.0.104

Solution

Apache Tomcat has officially released a new version to fix this vulnerability. It is recommended that affected users upgrade Tomcat to the unaffected version as soon as possible. Users who are inconvenient to upgrade can also temporarily disable the FileStore function or configure the value of sessionAttributeValueClassNameFilte separately to ensure that only objects with specific attributes can be serialized/deserialized.