# CVE-2021-23386: Remote Memory Exposure

- Severity: High 7.7 (CVSS:3.1, scored by snyk) `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 1.43%, higher than 73% of CVEs (2026-12-01)
- Published: 2021-05-20T16:15:18.500Z
- Modified: 2026-06-17T03:38:40.063Z
- Also known as: GHSA-3wcq-x3mq-6r9p
- Weaknesses: CWE-200, CWE-908, CWE-909
- Assigned by: snyk

## Description

This affects the package dns-packet before 5.2.2. It creates buffers with allocUnsafe and does not always fill them before forming network packets. This can expose internal application memory over unencrypted network when querying crafted invalid domain names.

(As written by CVE List.)

## Affected

- dns-packet: from unspecified before 5.2.2
- dns-packet (npm): from 2.0.0 before 5.2.2; before 1.3.2
- dns-packet_project dns-packet: before 1.3.4; from 2.0.0 before 5.2.2

## Every score

- snyk: CVSS:3.1 7.7 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:L`
- GitHub: CVSS:3.1 7.7 High `CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:C/C:H/I:L/A:L`
- NVD: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N`
- NVD: CVSS:2.0 4.0 Medium `AV:N/AC:L/Au:S/C:P/I:N/A:N`

## References

- <https://snyk.io/vuln/SNYK-JS-DNSPACKET-1293563> (patch, third-party-advisory, web)
- <https://snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1295719> (patch, third-party-advisory, web)
- <https://hackerone.com/bugs?subject=user&amp%3Breport_id=968858> (permissions-required, third-party-advisory, web)
- <https://github.com/mafintosh/dns-packet/commit/25f15dd0fedc53688b25fd053ebbdffe3d5c1c56> (patch, third-party-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-23386> (advisory)
- <https://github.com/mafintosh/dns-packet/commit/0d0d593f8df4e2712c43957a6c62e95047f12b2d> (web)

## Sources

- CVE List: [CVE-2021-23386](https://www.cve.org/CVERecord?id=CVE-2021-23386), CVE Terms of Use, modified 2024-09-16
- GitHub Advisory Database: [GHSA-3wcq-x3mq-6r9p](https://github.com/advisories/GHSA-3wcq-x3mq-6r9p), CC-BY-4.0, modified 2025-01-14
- NVD: [CVE-2021-23386](https://nvd.nist.gov/vuln/detail/CVE-2021-23386), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-23386 · Whole record: https://cve.day/CVE-2021-23386.json · Rebuilt by cve.day 2026-11-25T22:58:01.476Z
