Improper output encoding in Apache Log4cxx
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- High
- Attack requirements
- None
- Impact type
- —
- Confidentiality · integrity · availability
- None · None · None
- Fix status
- Partial Red Hat: 1 without a fix
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and Red Hat.
Summary
Apache Log4cxx's XMLLayout https://logging.apache.org/log4cxx/1.7.0/classlog4cxx_1_1xml_1_1XMLLayout.html , in versions before 1.7.0, fails to sanitize characters forbidden by the XML 1.0 specification https://www.w3.org/TR/xml/#charsets in log messages, NDC, and MDC property keys and values, producing invalid XML output. Conforming XML parsers must reject such documents with a fatal error, which may cause downstream log processing systems to drop or fail to index affected records. An attacker who can influence logged data can exploit this to suppress individual log records, impairing audit trails and detection of malicious activity. Users are advised to upgrade to Apache Log4cxx 1.7.0, which fixes this issue.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
Remediation
- Fix · CNA Apache Log4cxx (Apache Software Foundation) Fixed in 1.7.0
- Fix · CNA Apache Log4cxx (Conan) (Apache Software Foundation) Fixed in 1.7.0
- Fix · CNA Apache Log4cxx (Brew) (Apache Software Foundation) Fixed in 1.7.0
Vendor assessments
Red Hat
Red Hat rating: Moderate. Red Hat's page for this CVE →
| Product | Status | Plan or fix |
|---|---|---|
| Red Hat Enterprise Linux 7 | Affected | No fix planned: Out of support scope |
Timeline
- 2026-10-02 Threatist record created from CVE-2026-40023
- 2026-10-03 Alias added: GHSA-q8qr-wp2r-738r
- 2026-10-25 EPSS moved to the below the 50th percentile
References
Advisory 4
More Apache Log4cxx vulnerabilities
- TI-2023-14775 Apache Log4cxx: SQL injection when using ODBC appender CVSS 3.1HIGH 8.8
- TI-2025-34567 Apache Log4cxx: Improper escaping with JSONLayout CVSS 4.0MEDIUM 6.3
- TI-2025-34566 Apache Log4cxx: Improper HTML escaping in HTMLLayout CVSS 4.0LOW 2.1
Sources
- CVE-2026-40023 · CVE Program
- CVE-2026-40023 · NVD
- FIRST EPSS
- GHSA-q8qr-wp2r-738r · GitHub Advisory Database · CC BY 4.0
- CVE-2026-40023 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences