CVE-2023-31137
MaraDNS Integer Underflow Vulnerability in DNS Packet Decompression
Mitigation
- No fix listed yet: follow the vendor advisory.
Who should check
- Anyone running samboy MaraDNS <= 3.5.0024
Vulnerability facts
- Affected
- samboy MaraDNS <= 3.5.0024
- Fixed in
- No fix listed yet
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 7.5 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: None
- Integrity impact: None
- Availability impact: High
- EPSS
- 1.43% chance of exploitation in 30 days (percentile 73, 2026-11-26)
- CWE
- CWE-191
- Modified
Description
MaraDNS is open-source software that implements the Domain Name System (DNS). In version 3.5.0024 and prior, a remotely exploitable integer underflow vulnerability in the DNS packet decompression function allows an attacker to cause a Denial of Service by triggering an abnormal program termination. The vulnerability exists in the `decomp_get_rddata` function within the `Decompress.c` file. When handling a DNS packet with an Answer RR of qtype 16 (TXT record) and any qclass, if the `rdlength` is smaller than `rdata`, the result of the line `Decompress.c:886` is a negative number `len = rdlength - total;`. This value is then passed to the `decomp_append_bytes` function without proper validation, causing the program to attempt to allocate a massive chunk of memory that is impossible to allocate. Consequently, the program exits with an error code of 64, causing a Denial of Service. One proposed fix for this vulnerability is to patch `Decompress.c:887` by breaking `if(len <= 0)`, which has been incorporated in version 3.5.0036 via commit bab062bde40b2ae8a91eecd522e84d8b993bab58.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| samboy MaraDNS | <= 3.5.0024 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2023-31137. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2023-31137.md Affected: samboy MaraDNS <= 3.5.0024 Fixed in: no fixed version listed yet Steps: 1. Search this machine and project for samboy MaraDNS: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Other
- https://github.com/samboy/MaraDNS/blob/08b21ea20d80cedcb74aa8f14979ec7c61846663/dns/Decompress.c#L886
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NB7LDZM5AGWC5BHHQHW6CP5OFNBBKFOQ/
- https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3VSMLJX25MXGQ6A7UPOGK7VPUVDESPHL/
- https://lists.debian.org/debian-lts-announce/2023/06/msg00019.html
- https://www.debian.org/security/2023/dsa-5441
FAQ
Is CVE-2023-31137 being exploited?
There is no confirmed exploitation: CVE-2023-31137 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 1.43% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2023-31137?
High: CVSS 7.5 (v3.1, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2023-31137?
samboy MaraDNS <= 3.5.0024.
Is there a fix for CVE-2023-31137?
No fixed version is listed in the sources yet. No fix listed yet: follow the vendor advisory.
How do I check if I'm affected by CVE-2023-31137?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.