CVE-2020-12887: Arm Mbed OS - Integer Overflow
- Cve: CVE-2020-12887
- Name: Arm Mbed OS - Integer Overflow
- Description: Memory leaks were discovered in the CoAP library in Arm Mbed OS 5.15.3 when using the Arm mbed-coap library 5.1.5. The CoAP parser is responsible for parsing received CoAP packets. The function sn_coap_parser_options_parse() parses the CoAP option number field of all options present in the input packet. Each option number is calculated as a sum of the previous option number and a delta of the current option. The delta and the previous option number are expressed as unsigned 16-bit integers. Due to lack of overflow detection, it is possible to craft a packet that wraps the option number around and results in the same option number being processed again in a single packet. Certain options allocate memory by calling a memory allocation function. In the cases of COAP_OPTION_URI_QUERY, COAP_OPTION_URI_PATH, COAP_OPTION_LOCATION_QUERY, and COAP_OPTION_ETAG, there is no check on whether memory has already been allocated, which in conjunction with the option number integer overflow may lead to multiple assignments of allocated memory to a single pointer. This has been demonstrated to lead to memory leak by buffer orphaning. As a result, the memory is never freed.
- Impact: Memory leaks can lead to resource exhaustion, degraded performance, or system crashes over time.
- Remediation: Update to the latest version of Arm Mbed OS and mbed-coap library that addresses the overflow and memory management issues.
- Vulnerability type: integer_overflow
- Vulnerability impact: denial_of_service
- Requirement type: none
- Labels source: projectdiscovery
- Severity: high
- Cvss score: 7.5
- Cvss vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- Epss score: 0.01733
- Epss percentile: 0.78234
- Assignee: [email protected]
- Published at: 2020-06-18T19:15:11Z
- Age in days: 2350
- Modified at: 2026-06-17T02:52:29Z
- Patch available: yes
- References total: 4
- Products total: 1
- Oss: yes
- Projects total: 3
- Advisory url: https://nvd.nist.gov/vuln/detail/CVE-2020-12887
- Nvd status: modified
- Checked, none or zero: known exploited entries, nuclei templates, public exploits total, public exploits capped, public exploits, rejected by nvd
- Not known: requirements, hackerone
Cwe
| Id | Name |
|---|---|
| CWE-190 | Integer Overflow or Wraparound |
References
Same in every row:
- Source: nvd
| Url | Tags |
|---|---|
| https://github.com/mjurczak/mbed-coap/commit/4647a68e364401e81dbd370728127d844f221d93 | Patch, Third Party Advisory |
| https://github.com/ARMmbed/mbed-coap/pull/116 | Third Party Advisory |
| https://github.com/ARMmbed/mbed-os/issues/12930 | Third Party Advisory |
| https://github.com/ARMmbed/mbed-os/issues/12957 | Third Party Advisory |
Products
| Product | Affected | Platform bound | Sources | Url |
|---|---|---|---|---|
| arm:mbed-coap | = 5.1.5 | yes | nvd | /v1/products/arm/mbed-coap |
Projects
Same in every row:
- Indexed: yes
| Repository | Link kinds | Url |
|---|---|---|
| ARMmbed/mbed-os | issues | /v1/repositories/ARMmbed/mbed-os |
| armmbed/mbed-coap | pull | /v1/repositories/armmbed/mbed-coap |
| mjurczak/mbed-coap | commit | /v1/repositories/mjurczak/mbed-coap |
Index
- Checked, none or zero: repositories, repositories high signal, packages
Exploitation
- Remote: yes
- Checked, none or zero: known exploited, known exploited by, exploitation seen, public exploit, public exploit count, initial access, authentication required
- Not known: known exploited since, vulncheck known exploited since, public exploit first date, nuclei template, initial access since, hackerone reports, exposed hosts