# CVE-2021-22547: Buffer overrun in Google Cloud IoT Device SDK for Embedded C

- Severity: Medium 6.3 (CVSS:3.1, scored by Google) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.22%, higher than 12% of CVEs (2026-12-01)
- Published: 2021-05-04T13:05:17.000Z
- Modified: 2026-06-17T03:37:24.730Z
- Weaknesses: CWE-120
- Assigned by: Google

## Description

In IoT Devices SDK, there is an implementation of calloc() that doesn't have a length check. An attacker could pass in memory objects larger than the buffer and wrap around to have a smaller buffer than required, allowing the attacker access to the other parts of the heap. We recommend upgrading the Google Cloud IoT Device SDK for Embedded C used to 1.0.3 or greater.

(As written by CVE List.)

## Affected

- Google LLC Google Cloud IoT Device SDK for Embedded C: from unspecified up to 1.0.2
- google cloud_iot_device_sdk_for_embedded_c: before 1.0.3

## Every score

- Google: CVSS:3.1 6.3 Medium `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:N`
- NVD: CVSS:3.1 7.8 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 4.6 Medium `AV:L/AC:L/Au:N/C:P/I:P/A:P`

## References

- <https://github.com/GoogleCloudPlatform/iot-device-sdk-embedded-c/blob/master/RELEASE-NOTES.md> (release-notes, third-party-advisory)
- <https://github.com/GoogleCloudPlatform/iot-device-sdk-embedded-c/pull/119> (patch, third-party-advisory)

## Sources

- CVE List: [CVE-2021-22547](https://www.cve.org/CVERecord?id=CVE-2021-22547), CVE Terms of Use, modified 2024-08-03
- NVD: [CVE-2021-22547](https://nvd.nist.gov/vuln/detail/CVE-2021-22547), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2021-22547 · Whole record: https://cve.day/CVE-2021-22547.json · Rebuilt by cve.day 2026-11-25T22:58:01.135Z
