Vulnerability · Published Aug 22, 2025 · Assigned by apache

CVE-2025-54812Apache Log4cxx: Improper HTML escaping in HTMLLayout

Low 2.1

In plain English

A low-severity security flaw in Apache Log4cxx from Apache Software Foundation. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.2% (higher than 69% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 4.0)2.1Low
Exploit odds (30 days)1.2%top 30.8% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

Improper Output Neutralization for Logs vulnerability in Apache Log4cxx. When using HTMLLayout, logger names are not properly escaped when writing out to the HTML file. If untrusted data is used to retrieve the name of a logger, an attacker could theoretically inject HTML or Javascript in order to hide information from logs or steal data from the user. In order to activate this, the following sequence must occur: * Log4cxx is configured to use HTMLLayout. * Logger name comes from an untrusted string * Logger with compromised name logs a message * User opens the generated HTML log file in their browser, leading to potential XSS Because logger names are generally constant strings, we assess the impact to users as LOW This issue affects Apache Log4cxx: before 1.5.0. Users are recommended to upgrade to version 1.5.0, which fixes the issue.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12log4cxx1.0.0-1+deb12u1DEBIAN-CVE-2025-54812
Debian:13log4cxx1.4.0-1+deb13u1DEBIAN-CVE-2025-54812
Debian:14log4cxx1.4.0-1.1DEBIAN-CVE-2025-54812
Ubuntu:22.04:LTSlog4cxxno fix listedUBUNTU-CVE-2025-54812
Ubuntu:24.04:LTSlog4cxxno fix listedUBUNTU-CVE-2025-54812
Ubuntu:25.10log4cxxno fix listedUBUNTU-CVE-2025-54812
Ubuntu:26.04:LTSlog4cxxno fix listedUBUNTU-CVE-2025-54812

Affected products (as reported)

VendorProductVersions
Apache Software Foundation Apache Log4cxx 0 – before 1.5.0

Weakness: CWE-117 · Vector: CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N

References