CVE-2021-23386
Remote Memory Exposure
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- High
- Privileges needed
- Low
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- Low
- Availability
- Low
Exploit likelihood
What each source reports
CVE List Score used
7.7
Remote Memory Exposure
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.
- Record
CVE-2021-23386- 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 - Updated
- 2026-11-02
EUVDEUVD-2021-0923
7.7
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.
- Record
EUVD-2021-0923- 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 - Updated
- 2026-11-03
GitHub AdvisoriesGHSA-3wcq-x3mq-6r9p
7.7
Potential memory exposure in dns-packet
This affects the package dns-packet before versions 1.3.2 and 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.
- Record
GHSA-3wcq-x3mq-6r9p- 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 - Weakness
- CWE-200, CWE-908
- Updated
- 2026-11-02
NVD
7.7
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.
- Record
CVE-2021-23386- 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 - 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 - CVSS 2.0
- 4.0 Medium
AV:N/AC:L/Au:S/C:P/I:N/A:N - Weakness
- CWE-909
- Updated
- 2026-11-02
OSV
6.5
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.
- Record
CVE-2021-23386- 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 - Updated
- 2026-11-02
OSVGHSA-3wcq-x3mq-6r9p
7.7
Potential memory exposure in dns-packet
This affects the package dns-packet before versions 1.3.2 and 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.
- Record
GHSA-3wcq-x3mq-6r9p- 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 - Weakness
- CWE-200, CWE-908
- Updated
- 2026-11-02
OSVCLSA-2026-1780447839 No score
TuxCare security update for dns-packet (1 CVE)
TuxCare rebuilt dns-packet to address 1 CVE. Fixed in 1.3.1-tuxcare.1.
- Record
CLSA-2026-1780447839- Updated
- 2026-11-02
OSVROOT-APP-NPM-CVE-2021-23386 No score
CVE-2021-23386 in dns-packet - Patched by Root
Root has patched CVE-2021-23386 in the dns-packet package for Root:npm. Multiple fixed versions available.
- Record
ROOT-APP-NPM-CVE-2021-23386- Updated
- 2026-11-02
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
dns-packetnpm |
before 1.3.2 | 1.3.2 |
dns-packetnpm |
2.0.0 up to 5.2.2 | 5.2.2 |
dns-packetTuxCare:npm |
1.3.1-tuxcare.0 up to 1.3.1-tuxcare.1, plus listed versions 1.3.1 |
1.3.1-tuxcare.1 |
dns-packetRoot:npm |
before 1.3.1-aikido.1 | 1.3.1-aikido.1 |
@rootio/dns-packetRoot:npm |
before 1.3.1-root.io.1 | 1.3.1-root.io.1 |
History
| Recorded | Changed | Sources |
|---|---|---|
| aliases, published | EUVD | |
| first indexed | CVE List, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2021-23386 is a high vulnerability (CVSS 7.7) in Dns-packet Project Dns-packet, published May 20, 2021. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 1.43%, the 73rd percentile. Fixed in dns-packet 1.3.2.
References
snyk.io/vuln/SNYK-JS-DNSPACKET-1293563
snyk.io/vuln/SNYK-JAVA-ORGWEBJARSNPM-1295719
hackerone.com/bugs?subject=user&%3Breport_id=968858
github.com/mafintosh/dns-packet/commit/25f15dd0fedc53688b25fd053ebbdffe3d5c1c56
nvd.nist.gov/vuln/detail/CVE-2021-23386
github.com/mafintosh/dns-packet/commit/0d0d593f8df4e2712c43957a6c62e95047f12b2d
github.com/advisories/GHSA-3wcq-x3mq-6r9p