{"id":"CVE-2023-31137","aliases":["CVE-2023-31137"],"related":[],"kind":"vulnerability","state":"published","title":"MaraDNS Integer Underflow Vulnerability in DNS Packet Decompression","summary":"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.\n\nThe 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.\n\nOne 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.\n\nThe 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.\n\nOne 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.","source":"cvelist"}],"published":"2023-05-09T13:56:46.219Z","modified":"2026-06-17T05:56:21.527Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","score":7.5,"rating":"HIGH"}],"cwes":["CWE-191"],"affected":[{"ranges":[{"version":"<= 3.5.0024","status":"affected"}],"vendor":"samboy","product":"MaraDNS","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"3.4.10"},{"status":"affected","introduced":"3.5.0001","fixed":"3.5.0036"}],"vendor":"maradns","product":"maradns","cpe":"cpe:2.3:a:maradns:maradns:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"37"},{"status":"affected","version":"38"}],"vendor":"fedoraproject","product":"fedora","cpe":"cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"status":"affected","version":"10.0"},{"status":"affected","version":"11.0"}],"vendor":"debian","product":"debian_linux","cpe":"cpe:2.3:o:debian:debian_linux:10.0:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/samboy/MaraDNS/security/advisories/GHSA-58m7-826v-9c3c","tags":["vendor-advisory","x-refsource-confirm","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/samboy/MaraDNS/commit/bab062bde40b2ae8a91eecd522e84d8b993bab58","tags":["patch","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://github.com/samboy/MaraDNS/blob/08b21ea20d80cedcb74aa8f14979ec7c61846663/dns/Decompress.c#L886","tags":["product","x-refsource-misc","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NB7LDZM5AGWC5BHHQHW6CP5OFNBBKFOQ/","tags":["mailing-list","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/3VSMLJX25MXGQ6A7UPOGK7VPUVDESPHL/","tags":["mailing-list","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://lists.debian.org/debian-lts-announce/2023/06/msg00019.html","tags":["mailing-list","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://www.debian.org/security/2023/dsa-5441","tags":["mailing-list","third-party-advisory","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2024-03-08T16:26:06.644Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-31137","url":"https://www.cve.org/CVERecord?id=CVE-2023-31137","licence":"CVE Terms of Use","modified":"2025-02-13T16:49:46.296Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-31137","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-31137","licence":"Public domain","modified":"2026-06-17T05:56:21.527Z"}],"updatedAt":"2026-11-25T22:58:24.003Z","epss":{"score":0.01143,"percentile":0.67615,"date":"2026-12-01T12:00:22.000Z"}}