CVE-2021-42147 is a critical severity buffer over-read in Contiki-NG tinyDTLS, scored 9.1 by NVD. The dtls_sha256_update function can be crashed with crafted data, which allows denial of service. It affects code through master commit 53a0d97, and no fixed version was confirmed.
What's affected
The record describes a buffer over-read in the dtls_sha256_update function in Contiki-NG tinyDTLS through master commit 53a0d97. Remote attackers can cause denial of service through a crafted data packet. The vector is network reachable with no privileges and no interaction, and high impact on integrity and availability in the NVD score.
The record's affected range is Contiki-NG tinyDTLS through master branch commit 53a0d97. The vector is CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:H. I found no fixed version in the pages I could load, so the advisory and the project's issue tracker should be checked for the current state. A maintainer comment on the project's issue tracker points to the Eclipse tinyDTLS project, which suggests the code is also tracked upstream there.
The record was published to NVD in January 2024, although the underlying reports on the project's tracker date from October 2021. The NVD severity is the one used here, and the disclosure text I could load does not give a separate vendor rating.
Weakness class: CWE-125.
How to check if you're exposed
tinyDTLS is usually compiled into firmware, so there is no package manager to ask. The record's affected range is the master branch through commit 53a0d97, so the check is which commit your copy of the library is at.
If the library is a git submodule or a vendored clone with history, this prints a message when your copy is at or before that commit:
git -C path/to/tinydtls merge-base --is-ancestor HEAD 53a0d97 && echo "at or before 53a0d97"
To find where the library lives in a larger tree, run git submodule status | grep -i dtls and find . -maxdepth 6 -iname '*tinydtls*'. If you only have a release archive without history, compare the files against the project at that commit, or ask whoever supplied the SDK which commit it was cut from.
What to do now
- Find every product or firmware image that includes tinyDTLS, including the ones built by suppliers.
- Record which commit each one was built from, using the check above.
- Ask your supplier or the project whether a fixed commit exists for this CVE, and move to it when it does.
- Where DTLS is exposed on a network you do not control, add rate limiting and monitoring in front of the device until the fix is in place.
- Subscribe to the project's issue tracker so later fixes are noticed.
Why it matters
SHA-256 is used inside the handshake and for message integrity. The update function takes a pointer and a length and feeds the bytes into the hash. If the length comes from the packet and is not checked against what was actually received, the function reads past the end of the buffer. The record files it as CWE-125, out-of-bounds read.
A crash is the effect the record states. A read past the end can also touch unmapped memory on devices that have memory protection, which stops the process, or return junk on devices that do not. Many microcontrollers have no protection at all, and there the same bug may quietly feed neighbouring data into the hash.
This is the seventh entry in the same disclosure series, and the pattern is the point. Each bug is small, but together they show a library whose input handling was not fuzzed. If your product depends on it, treat the whole set as one work item and ask for a version of the library that has been reviewed against all of them.
This CVE is not listed in the CISA Known Exploited Vulnerabilities catalog, and none of the pages I read state that it is exploited in the wild. That is a statement about what is known, not a reason to delay the fix.
Quick check
Is this the same as CVE-2021-42144?
No. Both are buffer over-reads, but this one is in dtls_sha256_update and the other is in dtls_ccm_decrypt_message(). They are separate CVEs in the same library.
What is the fastest mitigation?
Restrict the DTLS port to known peers at the network edge, and ask your supplier for a build with fixes for the whole series.
Sources
Last reviewed: 19 October 2026.