Libevent
Libevent: HTTP header handling bugs create risk of access control bypass.
Libevent is an event notification library. Prior to 2.1.13 and 2.2.2-alpha, libevent has two HTTP parsing weaknesses in http.c. evhttp_decode_uri_internal decodes percent-encoded %00 bytes into literal NUL characters, which can cause downstream C string operations to truncate a path and bypass validation performed on a different representation. evhttp_header_is_valid_value also accepts obsolete line folding in header values containing carriage return or line feed characters, allowing a proxy and libevent to interpret headers differently and enabling header injection or access control bypass. The CRLF header acceptance is fixed in versions 2.1.13 and 2.2.2-alpha, but the reviewed patches do not clearly remediate the URI NUL-truncation condition.
Affected versions and mitigation
From the CVE record and the vendor's references.Affected
- >= 2.2.0-alpha, < 2.2.2-alpha
- < 2.1.13
Fixed in 2.2.2-alpha, 2.1.13
Mitigation
Upgrade libevent to 2.2.2-alpha or 2.1.13 or later.
References
- Vendor advisory github.com/libevent/libevent/security/advisori…
- Patch github.com/libevent/libevent/commit/758be0c0f6…
- Patch github.com/libevent/libevent/commit/9170dd35e6…
2 more
- Release notes github.com/libevent/libevent/releases/tag/rele…
- Release notes github.com/libevent/libevent/releases/tag/rele…
Timeline
Days relative to CVE publicationNo public PoC found yet; not in CISA KEV.
PoC repositories
Found on GitHub.No PoC repositories found yet.