{"schema":"/api/v1/schema/cve.json","api_version":"1","id":"CVE-2021-21257","published":"2021-06-18T21:15:07.583000Z","last_modified":"2026-06-17T03:35:08.410000Z","status":"Modified","cvss":{"version":"3.1","score":7.5,"severity":"HIGH","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","source":"nvd@nist.gov","primary":true},"auth":false,"cwes":["CWE-787"],"cpes":[{"criteria":"cpe:2.3:o:contiki-ng:contiki-ng:*:*:*:*:*:*:*:*","part":"o","vendor":"contiki-ng","product":"contiki-ng","version_end_excluding":"4.6"}],"cpes_truncated":false,"vendors":["contiki-ng"],"products":["contiki-ng/contiki-ng"],"epss":{"score":0.01088,"percentile":0.66295,"date":"2026-12-01","model_version":"v2026.06.15"},"cat":"os","platform":"multi","eol":false,"packages":[],"severity":"high","priority_score":60,"links":{"html_es":"/es/cve/CVE-2021-21257/","html_en":"/en/cve/CVE-2021-21257/","nvd":"https://nvd.nist.gov/vuln/detail/CVE-2021-21257","cve_org":"https://www.cve.org/CVERecord?id=CVE-2021-21257"},"untrusted":{"vendor_name":"Contiki-ng","product_name":"Contiki-ng","desc_en":"Contiki-NG is an open-source, cross-platform operating system for internet of things devices. The RPL-Classic and RPL-Lite implementations in the Contiki-NG operating system versions prior to 4.6 do not validate the address pointer in the RPL source routing header This makes it possible for an attacker to cause out-of-bounds writes with packets injected into the network stack. Specifically, the problem lies in the rpl_ext_header_srh_update function in the two rpl-ext-header.c modules for RPL-Classic and RPL-Lite respectively. The addr_ptr variable is calculated using an unvalidated CMPR field value from the source routing header. An out-of-bounds write can be triggered on line 151 in os/net/routing/rpl-lite/rpl-ext-header.c and line 261 in os/net/routing/rpl-classic/rpl-ext-header.c, which contain the following memcpy call with addr_ptr as destination. The problem has been patched in Contiki-NG 4.6. Users can apply a patch out-of-band as a workaround.","affected":[{"untrusted_vendor":"contiki-ng","untrusted_product":"contiki-ng","versions":[]}],"references":[{"url":"https://github.com/contiki-ng/contiki-ng/pull/1431","tags":["Patch","Third Party Advisory"]},{"url":"https://github.com/contiki-ng/contiki-ng/security/advisories/GHSA-mvc7-9p4q-c5cm","tags":["Patch","Third Party Advisory"]}]}}