CVE-2021-23386 Remote Memory Exposure

High 7.7 Published Updated

Attackers can read internal application memory by sending crafted invalid domain names to applications using the dns-packet library.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2021-23386?

CVE-2021-23386 is a high-severity vulnerability in dns-packet, published on 20 May 2021. Any signed-in user can exploit it over the network, with no action from the victim.

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

Weakness: CWE-909

Which versions are affected by CVE-2021-23386?

4 open source packages ship an affected version, including dns-packet. It affects 1 product.

PackageAffectedFixed in
dns-packet npmAll versions1.3.2
dns-packet npmAll versions1.3.2
dns-packet npmFrom 2.0.05.2.2
dns-packet npmFrom 2.0.05.2.2

Products include Dns-Packet Project Dns-Packet.

How do I fix CVE-2021-23386?

Upgrade dns-packet to a fixed version for your release line: 1.3.2 or 5.2.2.

Is CVE-2021-23386 being exploited?

There is no known exploitation of CVE-2021-23386 in the wild and no public exploit code.

Sources

Also known as CLSA-2026-1780447839, GHSA-3wcq-x3mq-6r9p, ROOT-APP-NPM-CVE-2021-23386.

Is CVE-2021-23386 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free