HOMEVULNERABILITIESCVE-2023-31137
HIGH

CVE-2023-31137

CWE-191Published: May 9, 2023· Updated: Jun 17, 2026

7.5
CVSS v3.1

Official 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.

NVD Source

Technical Analysis

CVE-2023-31137 can be exploited remotely over the network without requiring physical or adjacent access, significantly expanding the attack surface for threat actors.

The vulnerability requires no privileges and no user interaction, making it a prime target for automated exploitation campaigns and worm-like propagation.

A successful exploit results in availability disruption (denial of service), with a CVSS base score of 7.5.

CVSS v3.1 Vector Breakdown

Exploitability
Attack VectorNetwork
Attack ComplexityLow
Privileges Req.None
User InteractionNone
ScopeUnchanged
Impact
ConfidentialityNone
IntegrityNone
AvailabilityHigh
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Affected Vendors & Products

Debian1 product(s)
debian linux
Fedora1 product(s)
fedora
maradns1 product(s)
maradns
Source: NVD CPE · 5 total CPE entries

Exploit & PoC Resources

NO KNOWN EXPLOITNo public exploit confirmed at this time
External links open in a new tab. Always verify in a controlled environment before use.

Official Patches & Advisories

All References (14)

https://www.debian.org/security/2023/dsa-5441Mailing List · Third Party Advisory
https://www.debian.org/security/2023/dsa-5441Mailing List · Third Party Advisory

Quick Facts

CVE IDCVE-2023-31137
CVSS Score7.5 / 10
SeverityHIGH
WeaknessCWE-191
CISA KEVNo
Affected3 vendor(s)
PublishedMay 9, 2023

Related CVEs (CWE-191)

Recommended Actions

  • Apply vendor patches immediately
  • Monitor CVE-2023-31137 in threat intel feeds
  • Review IDS/IPS signatures for exploitation attempts
Data sourced from NVD (NIST), CISA KEV, and EPSS (FIRST). Analysis generated by CTIWATCH.COM. CVE data is provided under the NVD usage policy.