CVE-2026-129512: Apache log4net: AdoNetAppender loses an event whose text the database cannot store
Improper Neutralization of Null Byte or NUL Character vulnerability in the AdoNetAppender of Apache log4net.
Text parameters were bound unchanged, so a NUL character or an unpaired UTF-16 surrogate reached the database as it was. A database that refuses such a value, such as PostgreSQL, rejected the insert and the event was lost; only the first such loss per appender was reported. A party whose data reaches a log message could suppress that event.
This issue affects Apache log4net: from 1.2.9 before 3.6.0.
Users are recommended to upgrade to version 3.6.0, which fixes the issue.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade to a fixed release to a version that resolves this vulnerability.
Fixed in 3.6.0
Event History
Frequently Asked Questions
Who is exposed to this issue?
Applications using Apache log4net versions from 1.2.9 before 3.6.0 and configuring AdoNetAppender to write log events to a database are affected. Databases that reject NUL characters or unpaired UTF-16 surrogates, such as PostgreSQL, can cause the affected event to be lost.
What does an attacker need to exploit it?
A party needs to be able to cause a NUL character or unpaired UTF-16 surrogate to reach text included in a log message. No authentication or user interaction is required according to the supplied vector.
What is the impact on logging?
The database rejects the insert and the associated log event is lost, allowing suppression of that event from the database-backed log. Only the first such loss per appender is reported.
What should teams do if they use the affected appender?
Upgrade Apache log4net to version 3.6.0, which fixes the issue. Until upgrading, treat database logging failures involving unsupported text values as potential lost events and account for the fact that only the first loss per appender is reported.