Apache Log4cxx Improper Output Neutralization Vulnerability in HTMLLayout

Vulnerability

A vulnerability exists in Apache Log4cxx versions prior to 1.5.0, specifically within the HTMLLayout component. The issue arises because logger names are not properly escaped when written to HTML files. If untrusted data is used to determine a logger's name, an attacker could inject HTML or JavaScript, potentially leading to information being hidden from logs or data being stolen from the user. This vulnerability could be exploited by logging a message with a compromised logger name, which would then be opened in a web browser, creating a cross-site scripting (XSS) risk.

Impact

Exploitation of this vulnerability could result in cross-site scripting (XSS) attacks, allowing for the injection of malicious scripts that could be executed in the context of the user's browser.

Reproduction

To reproduce this vulnerability, Log4cxx must be configured to use HTMLLayout. Once this is set, a logger name sourced from an untrusted string should be used. When a message is logged with this compromised logger name, the generated HTML log file can be opened in a browser, triggering the potential XSS exploit.

Remediation

Users are advised to upgrade to Apache Log4cxx version 1.5.0, which addresses this vulnerability.

Added: Aug 22, 2025, 7:20 PM
Updated: Aug 22, 2025, 7:20 PM

Vulnerability Rating

Custom Algorithm
spread
5.4
impact
1.7
exploitability
4.3
remediation
7.7
relevance
0.4
threat
1.6
urgency
2.9
incentive
1.7

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.