Buffer overflow in Mbed

CVE-2019-17212

Buffer overflows were discovered in the CoAP library in Arm Mbed OS 5.14.0. The CoAP parser is responsible for parsing received CoAP packets. The function sn_coap_parser_options_parse() parses CoAP input linearly using a while loop. Once an option is parsed in a loop, the current point (*packet_data_pptr) is increased correspondingly. The pointer is restricted by the size of the received buffer, as well as by the 0xFF delimiter byte. Inside each while loop, the check of the value of *packet_data_pptr is not strictly enforced. More specifically, inside a loop, *packet_data_pptr could be increased and then dereferenced without checking. Moreover, there are many other functions in the format of sn_coap_parser_****() that do not check whether the pointer is within the bounds of the allocated buffer. All of these lead to heap-based or stack-based buffer overflows, depending on how the CoAP packet buffer is allocated.

Published · last modified .

CVSS v3 metric

CVSS v3 base score 9.8 (Critical). Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.

EPSS exploit prediction

EPSS: 0.031 (87.1th percentile), scored .

Low probability of exploitation in the next 30 days, but still tracked. 87th percentile — 87.1% of CVEs in the catalogue have a lower EPSS than this one. How to read EPSS.

EPSS trend (30 days)EPSS over the last 30 days for CVE-2019-17212: held from 0.031 to 0.031.

EPSS over last 30 days · oldest: 0.031 · newest: 0.031 · change: 0.000

Affected products

  • Mbed — versions 5.13.2, 5.14.0

Weakness classification (CWE)

References

Frequently asked questions

What is CVE-2019-17212?
CVE-2019-17212 is a critical-severity vulnerability in Mbed, classified under Improper Validation of Array Index. CVSS score: 9.8/10. Published 2019-11-05.
How severe is CVE-2019-17212?
Critical severity. CVSS v3 base score is 9.8 out of 10.