Apache Log4net up to 3.2.x XmlLayout/XmlLayoutSchemaLog4J escape output

| CVSS Meta Temp Score | Current Exploit Price (≈) | CTI Interest Score |
|---|---|---|
| 3.6 | $0-$5k | 0.00 |
Summary
A vulnerability categorized as problematic has been discovered in Apache Log4net up to 3.2.x. Affected by this vulnerability is the function XmlLayout/XmlLayoutSchemaLog4J. Such manipulation leads to escape output.
This vulnerability is referenced as CVE-2026-40021. It is possible to launch the attack remotely. No exploit is available.
It is advisable to upgrade the affected component.
Details
A vulnerability was found in Apache Log4net up to 3.2.x. It has been rated as problematic. Affected by this issue is the function XmlLayout/XmlLayoutSchemaLog4J. The manipulation with an unknown input leads to a escape output vulnerability. Using CWE to declare the problem leads to CWE-116. The product prepares a structured message for communication with another component, but encoding or escaping of the data is either missing or done incorrectly. As a result, the intended structure of the message is not preserved. Impacted is integrity. CVE summarizes:
Apache Log4net's XmlLayout https://logging.apache.org/log4net/manual/configuration/layouts.html#layout-list and XmlLayoutSchemaLog4J https://logging.apache.org/log4net/manual/configuration/layouts.html#layout-list , in versions before 3.3.0, fail to sanitize characters forbidden by the XML 1.0 specification https://www.w3.org/TR/xml/#charsets in MDC property keys and values, as well as the identity field that may carry attacker-influenced data. This causes an exception during serialization and the silent loss of the affected log event. An attacker who can influence any of these fields can exploit this to suppress individual log records, impairing audit trails and detection of malicious activity. Users are advised to upgrade to Apache Log4net 3.3.0, which fixes this issue.
The weakness was published by f00dat. The advisory is shared for download at github.com. This vulnerability is handled as CVE-2026-40021 since 04/08/2026. The exploitation is known to be difficult. The attack may be launched remotely. No form of authentication is required for exploitation. There are known technical details, but no exploit is available. The current price for an exploit might be approx. USD $0-$5k (estimation calculated on 04/11/2026).
The vulnerability scanner Nessus provides a plugin with the ID 306027 (Linux Distros Unpatched Vulnerability : CVE-2026-40021), which helps to determine the existence of the flaw in a target environment.
Upgrading to version 3.3.0 eliminates this vulnerability.
The vulnerability is also documented in the vulnerability database at Tenable (306027). VulDB is the best source for vulnerability data and more expert information about this specific topic.
Product
Vendor
Name
Version
License
Website
- Vendor: https://www.apache.org/
CPE 2.3
CPE 2.2
CVSSv4
VulDB Vector: 🔒VulDB Reliability: 🔍
CNA CVSS-B Score: 🔒
CNA CVSS-BT Score: 🔒
CNA Vector: 🔒
CVSSv3
VulDB Meta Base Score: 3.7VulDB Meta Temp Score: 3.6
VulDB Base Score: 3.7
VulDB Temp Score: 3.6
VulDB Vector: 🔒
VulDB Reliability: 🔍
CVSSv2
| AV | AC | Au | C | I | A |
|---|---|---|---|---|---|
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| 💳 | 💳 | 💳 | 💳 | 💳 | 💳 |
| Vector | Complexity | Authentication | Confidentiality | Integrity | Availability |
|---|---|---|---|---|---|
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
| Unlock | Unlock | Unlock | Unlock | Unlock | Unlock |
VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍
Exploiting
Class: Escape outputCWE: CWE-116 / CWE-74 / CWE-707
CAPEC: 🔒
ATT&CK: 🔒
Physical: No
Local: No
Remote: Yes
Availability: 🔒
Status: Not defined
EPSS Score: 🔒
EPSS Percentile: 🔒
Price Prediction: 🔍
Current Price Estimation: 🔒
| 0-Day | Unlock | Unlock | Unlock | Unlock |
|---|---|---|---|---|
| Today | Unlock | Unlock | Unlock | Unlock |
Nessus ID: 306027
Nessus Name: Linux Distros Unpatched Vulnerability : CVE-2026-40021
Threat Intelligence
Interest: 🔍Active Actors: 🔍
Active APT Groups: 🔍
Countermeasures
Recommended: UpgradeStatus: 🔍
0-Day Time: 🔒
Upgrade: Log4net 3.3.0
Timeline
04/08/2026 CVE reserved04/10/2026 Advisory disclosed
04/10/2026 VulDB entry created
04/11/2026 VulDB entry last update
Sources
Vendor: apache.orgAdvisory: github.com
Researcher: f00dat
Status: Confirmed
CVE: CVE-2026-40021 (🔒)
GCVE (CVE): GCVE-0-2026-40021
GCVE (VulDB): GCVE-100-356840
Entry
Created: 04/10/2026 17:54Updated: 04/11/2026 22:16
Changes: 04/10/2026 17:54 (67), 04/11/2026 22:16 (2)
Complete: 🔍
Cache ID: 216::103
VulDB is the best source for vulnerability data and more expert information about this specific topic.
No comments yet. Languages: en.
Please log in to comment.