A buffer overflow issue was discovered in the CoAP library of Arm Mbed OS. The CoAP parser, specifically the function `sn coap parser options parse()`, is responsible for parsing received CoAP packets. The issue arises from the lack of strict enforcement of the `*packet data pptr` value within the while loop, allowing it to be increased and then dereferenced without proper bounds checking. This, along with similar issues in other `sn coap parser ****()` functions, can lead to heap-based or stack-based buffer overflows, depending on the allocation of the CoAP packet buffer.