LiveActive security incident?Get immediate response
CVE Record

CVE-2021-21257: Out-of-bounds write in RPL-Classic and RPL-Lite

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.

HighCVSS 8.2Not KEV-listedUpdated
Glexia's TakeAutomated analysishigh

Security readout for executives and security teams

Plain-English summary

CVE-2021-21257 is a memory corruption flaw in Contiki-NG, an IoT operating system. A network packet reaching affected RPL routing code can trigger out-of-bounds writes. The practical impact is integrity risk and some availability risk for devices running Contiki-NG before 4.6.

Executive priority

Treat as a high-priority IoT platform remediation item where Contiki-NG is used. Urgency is strongest for devices exposed to reachable or injectable network traffic. No active exploitation is evidenced in the provided sources.

Technical view

RPL-Classic and RPL-Lite before Contiki-NG 4.6 fail to validate an address pointer derived from the source routing header CMPR field. The vulnerable rpl_ext_header_srh_update function can use that pointer as a memcpy destination, causing out-of-bounds writes.

Likely exposure

Exposure is limited to products, firmware, or projects using Contiki-NG versions before 4.6 with RPL-Classic or RPL-Lite enabled. The source bundle does not identify downstream affected devices or vendors.

Exploitation context

The CVSS vector indicates network attack, low complexity, no privileges, and no user interaction. The bundle does not show CISA KEV listing or any cited evidence of active exploitation.

Researcher notes

The vulnerability maps to CWE-787 and affects rpl_ext_header_srh_update in both RPL-Lite and RPL-Classic. The root issue is unvalidated CMPR-derived pointer arithmetic before memcpy. Evidence is strong for upstream Contiki-NG, but downstream product impact is not documented here.

Mitigation direction

  • Upgrade affected Contiki-NG deployments to version 4.6 or later.
  • Apply the vendor patch out-of-band if immediate upgrade is not feasible.
  • Review Contiki-NG advisory GHSA-mvc7-9p4q-c5cm for vendor guidance.
  • Prioritize devices where RPL packet processing is reachable from untrusted networks.

Validation and detection

  • Inventory firmware and build manifests for Contiki-NG versions before 4.6.
  • Confirm whether RPL-Classic or RPL-Lite is compiled or enabled.
  • Check whether the vulnerable rpl-ext-header.c modules are present.
  • Verify remediation by confirming version 4.6 or the referenced patch is applied.
Prepared
Confidence
high
Sources
4

Generated from the cited source records. This long-tail analysis has not been individually reviewed by a named human.

Potential ATT&CK relevance

Conservative CVE-to-ATT&CK context

These mappings and lookup hints may be relevant to the vulnerability behavior, CWE, affected product, or exposure path. Glexia-inferred context is not an official MITRE, ATT&CK, CWE, or CVE Program mapping.

ATT&CK lookup starting points

Use these exact CWE pages and searches to review the Glexia ATT&CK library from this CVE's weakness and description context.

cwe · low confidence lookup

CWE-787: Exact CWE lookup

Use the exact CWE identifier as the starting point before reviewing related ATT&CK behavior. Open the exact CWE lookup page first, then review the ATT&CK searches from that MITRE weakness context. This is a Glexia lookup hint, not an official ATT&CK mapping.

Open ATT&CK lookup
cve · low confidence lookup

CVE-2021-21257 mapping review

Open the CVE-to-ATT&CK bridge for reviewed, inferred, or future official mappings tied to this CVE.

Open ATT&CK lookup
Vulnerability profileCVE Program record
Severity
High
CVSS
8.2 (3.1)
Known Exploited
No
Published

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L

Official CVE source material

CNA and ADP enrichment extracted from CVE v5

These fields come from the CVE record and ADP containers, not from Glexia's Take. They preserve time-varying source decisions such as CISA SSVC, KEV status, CVSS metrics, and provider references.

1CVSS vectors
0Timeline events
0ADP providers
3Source links

CVSS vector scores

1 official score

We collect every scored CVSS vector available in the official CNA and ADP containers. When more than one version is present, the table keeps the source vectors side by side instead of collapsing them into the highest score.

ScoreVersionSeverityVectorExploitImpactSource
8.2CVSS 3.1HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L3.94.2Primary CVE score

Vulnerability scoring details

Base CVSS 3.1 score

8.2High
CVSS 3.1 vector shape for CVE-2021-21257Attack VectorAttack ComplexityPrivileges RequiredUser InteractionScopeConfidentiality ImpactIntegrity ImpactAvailability Impact

Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:L

Attack Vector
NetworkAdjacentLocalPhysical
Attack Complexity
LowHigh
Privileges Required
NoneLowHigh
User Interaction
NoneRequired
Scope
ChangedUnchanged
Confidentiality Impact
HighLowNone
Integrity Impact
HighLowNone
Availability Impact
HighLowNone
Affected products

Products and packages named in the record

VendorProductVersion / packageStatus
contiki-ngcontiki-ng< 4.6Listed
Weakness

CWE details

CWE links open Glexia weakness intelligence pages with official CWE context, developer remediation guidance, and related CVE mappings.

CWE-787 · source CWE mapping

Out-of-bounds Write

Out-of-bounds Write represents a recurring weakness pattern that can create exploitable paths when design, validation, or implementation controls are missing.