CVE-2025-55754

Apache · Apache Tomcat

A critical vulnerability has been identified in Apache Tomcat, which could allow an attacker to execute malicious code.

Executive summary

A critical vulnerability has been identified in Apache Tomcat, which could allow an attacker to execute malicious code. By sending a specially crafted request to the server, an attacker can embed hidden commands into the log files, which are then triggered when an administrator views these logs, potentially leading to a complete compromise of the administrator's system and the wider network.

Vulnerability

The vulnerability, classified as Improper Neutralization of Escape, Meta, or Control Sequences, exists because Apache Tomcat fails to sanitize ANSI escape sequences in data written to its log files. An unauthenticated remote attacker can send a specially crafted HTTP request (e.g., with a malicious User-Agent string or URL) to a vulnerable server. The server logs this request, including the malicious escape sequences, without proper neutralization. When an administrator or an automated tool views these logs on a terminal that interprets ANSI escape sequences (such as older Windows consoles), the embedded sequences are executed on the administrator's machine, which can lead to arbitrary code execution.

Business impact

This vulnerability is rated as critical severity with a CVSS score of 9.6. Successful exploitation could lead to remote code execution on the systems of personnel who view the logs, such as system administrators or security analysts. This initial compromise can serve as a pivot point for attackers to gain deeper access into the corporate network, escalate privileges, exfiltrate sensitive data, install ransomware, or cause widespread service disruption. The potential consequences include significant data breaches, financial loss, operational downtime, and severe reputational damage.

Remediation

Immediate Action: Update Apache Tomcat to the latest version as recommended by the vendor. After patching, it is crucial to monitor for signs of exploitation attempts by reviewing historical and current access logs for suspicious patterns containing escape sequences.

Proactive Monitoring: Security teams should actively monitor Apache Tomcat access logs for the presence of ANSI escape sequence characters (e.g., \x1b, \e, \033). Monitor for unusual outbound network connections from administrator workstations and other systems used for log analysis. Implement alerts for log entries that contain an unusually high number of non-standard characters.

Compensating Controls: If immediate patching is not feasible, implement the following controls to mitigate risk:

  • Ensure all personnel view logs using terminal emulators or log viewing tools that are configured to not interpret or render control characters and escape sequences.
  • Configure a Web Application Firewall (WAF) to inspect incoming requests and block those containing common ANSI escape sequences.
  • Modify logging configurations to strip or replace control characters before writing messages to log files.

Exploitation status

Public Exploit Available: false

Analyst recommendation

Given the critical CVSS score of 9.6 and the potential for remote code execution, it is strongly recommended that organizations prioritize the immediate patching of all affected Apache Tomcat instances. Although this vulnerability is not currently listed on the CISA KEV (Known Exploited Vulnerabilities) catalog, its severity makes it a prime candidate for future inclusion. The risk of compromise is significant, and immediate action is required to apply vendor-supplied updates, implement enhanced monitoring, and apply compensating controls where patching is delayed.