{"schemaVersion":3,"id":"CVE-2026-40021","aliases":["UBUNTU-CVE-2026-40021","DEBIAN-CVE-2026-40021","GHSA-4f7c-pmjv-c25w"],"status":"published","duplicateOf":null,"title":null,"description":"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.\n\nAn attacker who can influence any of these fields can exploit this to suppress individual log records, impairing audit trails and detection of malicious activity.\n\nUsers are advised to upgrade to Apache Log4net 3.3.0, which fixes this issue.","dates":{"published":"2026-04-10T15:44:17.451Z","modified":"2026-04-10T17:35:01.228Z","reserved":null,"kevAdded":[],"kevDue":[]},"cvss":{"headline":{"score":6.3,"severity":"medium","version":"4.0","versionLabel":"v4.0","source":"CVE.org","vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N","computed":false,"selection":"backend-summary"},"metrics":[{"version":"4.0","versionLabel":"v4.0","source":"CVE.org","score":6.3,"severity":"medium","vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N","exploitability":null,"impact":null,"computed":false},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Ubuntu","score":6.3,"severity":"medium","vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N","exploitability":null,"impact":null,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Ubuntu","score":5.3,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","exploitability":10,"impact":2.3,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Debian","score":5.3,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","exploitability":10,"impact":2.3,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"OSV · Nuget","score":6.3,"severity":"medium","vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N","exploitability":null,"impact":null,"computed":true},{"version":"3.1","versionLabel":"v3.1","source":"OSV · Nuget","score":5.3,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","exploitability":10,"impact":2.3,"computed":true},{"version":"4.0","versionLabel":"v4.0","source":"NVD","score":6.3,"severity":"medium","vector":"CVSS:4.0/AV:N/AC:H/AT:N/PR:N/UI:N/VC:N/VI:N/VA:N/SC:N/SI:L/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","exploitability":null,"impact":null,"computed":false},{"version":"3.1","versionLabel":"v3.1","source":"NVD","score":5.3,"severity":"medium","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N","exploitability":null,"impact":null,"computed":false}]},"epss":{"probability":0.00981,"percentile":0.616,"severity":"low","asOf":"2026-10-18T00:00:00.000Z","change":{"pp":0.23099999999999996,"baselineDate":"2026-09-18T00:00:00.000Z","baselineScore":0.0075},"history":[{"date":"2026-09-14T00:00:00.000Z","score":0.0075,"percentile":null},{"date":"2026-09-15T00:00:00.000Z","score":0.0075,"percentile":null},{"date":"2026-09-16T00:00:00.000Z","score":0.0075,"percentile":null},{"date":"2026-09-17T00:00:00.000Z","score":0.0075,"percentile":null},{"date":"2026-09-18T00:00:00.000Z","score":0.0075,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.0075,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.0075,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.0075,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.0075,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.0075,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00981,"percentile":0.616}],"last30":[{"date":"2026-09-18T00:00:00.000Z","score":0.0075,"percentile":null},{"date":"2026-09-19T00:00:00.000Z","score":0.0075,"percentile":null},{"date":"2026-09-20T00:00:00.000Z","score":0.0075,"percentile":null},{"date":"2026-09-21T00:00:00.000Z","score":0.0075,"percentile":null},{"date":"2026-09-22T00:00:00.000Z","score":0.0075,"percentile":null},{"date":"2026-09-23T00:00:00.000Z","score":0.0075,"percentile":null},{"date":"2026-09-24T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-09-25T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-09-26T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-09-27T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-09-28T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-09-29T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-09-30T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-01T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-02T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-03T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-04T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-05T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-06T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-07T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-08T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-09T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-10T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-11T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-12T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-13T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-14T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-15T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-16T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-17T00:00:00.000Z","score":0.00981,"percentile":null},{"date":"2026-10-18T00:00:00.000Z","score":0.00981,"percentile":0.616}]},"kev":{"state":"not-listed","entries":[],"listedCount":0,"totalCatalogs":3,"catalogs":[{"source":"cisa","label":"CISA","listed":false,"entry":null},{"source":"enisa","label":"ENISA","listed":false,"entry":null},{"source":"circl","label":"CIRCL","listed":false,"entry":null}]},"ransomware":{"state":"none-recorded","sources":[]},"exploits":[],"exploitCount":0,"weaknesses":[{"id":"CWE-116","name":"Improper Encoding or Escaping of Output","description":"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.","type":"weakness","status":"Draft","abstraction":"Class","likelihoodOfExploit":"High","url":"https://cwe.mitre.org/data/definitions/116.html"}],"affected":[{"vendor":"apache software foundation","product":"apache log4net","name":"Apache Log4net","label":"apache log4net","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 3.3.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.3.0","eol":null,"hubHref":"/vendor/apache_software_foundation/apache_log4net"},{"vendor":"apache","product":"log4net","name":"log4net","label":"log4net","ecosystem":null,"cpePart":"a","purl":null,"purlType":null,"versions":[{"text":"< 3.3.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.3.0","eol":null,"hubHref":"/vendor/apache/log4net"},{"vendor":"debian","product":"log4net","name":"log4net","label":"log4net","ecosystem":"Debian","cpePart":null,"purl":"pkg:deb/debian/log4net","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null},{"text":"< 1.2.10+dfsg-10","noFixRecorded":false,"fixedIn":null}],"versionsText":"All versions (No fix recorded) | < 1.2.10+dfsg-10","eol":null,"hubHref":null},{"vendor":"ubuntu","product":"log4net","name":"log4net","label":"log4net","ecosystem":"Ubuntu","cpePart":null,"purl":"pkg:deb/ubuntu/log4net","purlType":"deb","versions":[{"text":"All versions","noFixRecorded":true,"fixedIn":null}],"versionsText":"All versions (No fix recorded)","eol":null,"hubHref":null},{"vendor":"NuGet","product":"log4net","name":"log4net","label":"log4net","ecosystem":"NuGet","cpePart":null,"purl":"pkg:nuget/log4net","purlType":"nuget","versions":[{"text":"< 3.3.0","noFixRecorded":false,"fixedIn":null}],"versionsText":"< 3.3.0","eol":null,"hubHref":null}],"affectedCount":5,"eol":{"hasEol":false,"count":0},"references":[{"url":"https://github.com/apache/logging-log4net/pull/280","label":"github.com/apache/logging-log4net/pull/280","hostname":"github.com","tags":["Patch","REPORT","WEB","Issue Tracking"]},{"url":"https://logging.apache.org/security.html#CVE-2026-40021","label":"logging.apache.org/security.html","hostname":"logging.apache.org","tags":["Vendor Advisory","REPORT","WEB"]},{"url":"https://logging.apache.org/cyclonedx/vdr.xml","label":"logging.apache.org/cyclonedx/vdr.xml","hostname":"logging.apache.org","tags":["Vendor Advisory","REPORT","WEB","Product"]},{"url":"https://logging.apache.org/log4net/manual/configuration/layouts.html","label":"logging.apache.org/log4net/manual/configuration/layouts.html","hostname":"logging.apache.org","tags":["Related","REPORT","WEB","Product"]},{"url":"https://lists.apache.org/thread/q8otftjswhk69n3kxslqg7cobr0x4st7","label":"lists.apache.org/thread/q8otftjswhk69n3kxslqg7cobr0x4st7","hostname":"lists.apache.org","tags":["Vendor Advisory","REPORT","WEB","Mailing List"]},{"url":"http://www.openwall.com/lists/oss-security/2026/04/10/11","label":"www.openwall.com/lists/oss-security/2026/04/10/11","hostname":"www.openwall.com","tags":["REPORT","WEB","Mailing List","Third Party Advisory"]},{"url":"https://ubuntu.com/security/CVE-2026-40021","label":"ubuntu.com/security/CVE-2026-40021","hostname":"ubuntu.com","tags":["REPORT"]},{"url":"https://www.cve.org/CVERecord?id=CVE-2026-40021","label":"www.cve.org/CVERecord?id=CVE-2026-40021","hostname":"www.cve.org","tags":["REPORT"]},{"url":"https://security-tracker.debian.org/tracker/CVE-2026-40021","label":"security-tracker.debian.org/tracker/CVE-2026-40021","hostname":"security-tracker.debian.org","tags":["Advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-40021","label":"nvd.nist.gov/vuln/detail/CVE-2026-40021","hostname":"nvd.nist.gov","tags":["Advisory"]},{"url":"https://github.com/apache/logging-log4net","label":"github.com/apache/logging-log4net","hostname":"github.com","tags":["PACKAGE"]}],"lineage":{"upstream":[],"downstream":[],"duplicates":[],"related":[]},"timeline":[{"kind":"published","date":"2026-04-10T15:44:17.451Z","label":"Published","detail":"Vulnerability first disclosed.","source":null},{"kind":"modified","date":"2026-04-10T17:35:01.228Z","label":"Last modified","detail":"Vulnerability information updated.","source":null}],"risk":{"score":25,"level":"medium","profile":"Default","thresholds":{"critical":75,"high":50,"medium":25,"low":10}},"meta":{"dataAsOf":"2026-10-19T09:04:10.765Z","stale":false,"partial":false}}