2025-12-26 23:57CVE-2025-68474GitHub_M
PUBLISHED5.2CWE-787

ESF-IDF Has Out-of-Bounds Write in ESP32 Bluetooth AVRCP Vendor Command Handling

ESF-IDF is the Espressif Internet of Things (IOT) Development Framework. In versions 5.5.1, 5.4.3, 5.3.4, 5.2.6, 5.1.6, and earlier, in the avrc_vendor_msg() function of the ESP-IDF BlueDroid AVRCP stack, the allocated buffer size was validated using AVRC_MIN_CMD_LEN (20 bytes). However, the actual fixed header data written before the vendor payload exceeds this value. This totals 29 bytes written before p_msg->p_vendor_data is copied. Using the old AVRC_MIN_CMD_LEN could allow an out-of-bounds write if vendor_len approaches the buffer limit. For commands where vendor_len is large, the original buffer allocation may be insufficient, causing writes beyond the allocated memory. This can lead to memory corruption, crashes, or other undefined behavior. The overflow could be larger when assertions are disabled.

Problem type

Affected products

espressif

esp-idf

>= 5.5-beta1, <= 5.5.1 - AFFECTED

>= 5.4-beta1, <= 5.4.3 - AFFECTED

>= 5.3-beta1, <= 5.3.4 - AFFECTED

>= 5.2-beta1, <= 5.2.6 - AFFECTED

<= 5.1.6 - AFFECTED

References

JSON source

https://cveawg.mitre.org/api/cve/CVE-2025-68474
Click to expand
{
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "cveMetadata": {
    "cveId": "CVE-2025-68474",
    "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
    "assignerShortName": "GitHub_M",
    "dateUpdated": "2025-12-26T23:57:54.853Z",
    "dateReserved": "2025-12-18T13:52:15.491Z",
    "datePublished": "2025-12-26T23:57:54.853Z",
    "state": "PUBLISHED"
  },
  "containers": {
    "cna": {
      "providerMetadata": {
        "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "shortName": "GitHub_M",
        "dateUpdated": "2025-12-26T23:57:54.853Z"
      },
      "title": "ESF-IDF Has Out-of-Bounds Write in ESP32 Bluetooth AVRCP Vendor Command Handling",
      "descriptions": [
        {
          "lang": "en",
          "value": "ESF-IDF is the Espressif Internet of Things (IOT) Development Framework. In versions 5.5.1, 5.4.3, 5.3.4, 5.2.6, 5.1.6, and earlier, in the avrc_vendor_msg() function of the ESP-IDF BlueDroid AVRCP stack, the allocated buffer size was validated using AVRC_MIN_CMD_LEN (20 bytes). However, the actual fixed header data written before the vendor payload exceeds this value. This totals 29 bytes written before p_msg->p_vendor_data is copied. Using the old AVRC_MIN_CMD_LEN could allow an out-of-bounds write if vendor_len approaches the buffer limit. For commands where vendor_len is large, the original buffer allocation may be insufficient, causing writes beyond the allocated memory. This can lead to memory corruption, crashes, or other undefined behavior. The overflow could be larger when assertions are disabled."
        }
      ],
      "affected": [
        {
          "vendor": "espressif",
          "product": "esp-idf",
          "versions": [
            {
              "version": ">= 5.5-beta1, <= 5.5.1",
              "status": "affected"
            },
            {
              "version": ">= 5.4-beta1, <= 5.4.3",
              "status": "affected"
            },
            {
              "version": ">= 5.3-beta1, <= 5.3.4",
              "status": "affected"
            },
            {
              "version": ">= 5.2-beta1, <= 5.2.6",
              "status": "affected"
            },
            {
              "version": "<= 5.1.6",
              "status": "affected"
            }
          ]
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "lang": "en",
              "description": "CWE-787: Out-of-bounds Write",
              "cweId": "CWE-787",
              "type": "CWE"
            }
          ]
        }
      ],
      "references": [
        {
          "url": "https://github.com/espressif/esp-idf/security/advisories/GHSA-43gh-7r4f-qp57",
          "name": "https://github.com/espressif/esp-idf/security/advisories/GHSA-43gh-7r4f-qp57",
          "tags": [
            "x_refsource_CONFIRM"
          ]
        },
        {
          "url": "https://github.com/espressif/esp-idf/commit/0b0b59f2e19cb99dfa1b28c284d1c5c1d276a132",
          "name": "https://github.com/espressif/esp-idf/commit/0b0b59f2e19cb99dfa1b28c284d1c5c1d276a132",
          "tags": [
            "x_refsource_MISC"
          ]
        },
        {
          "url": "https://github.com/espressif/esp-idf/commit/565fa98d0cfd58102204c1cb636747e17ee59845",
          "name": "https://github.com/espressif/esp-idf/commit/565fa98d0cfd58102204c1cb636747e17ee59845",
          "tags": [
            "x_refsource_MISC"
          ]
        },
        {
          "url": "https://github.com/espressif/esp-idf/commit/8262ee807d5cd425f66304f703eeb3382fb888c0",
          "name": "https://github.com/espressif/esp-idf/commit/8262ee807d5cd425f66304f703eeb3382fb888c0",
          "tags": [
            "x_refsource_MISC"
          ]
        },
        {
          "url": "https://github.com/espressif/esp-idf/commit/a6c1bc5e3e91ad1cb964ce2c178ee40a5d10a4a0",
          "name": "https://github.com/espressif/esp-idf/commit/a6c1bc5e3e91ad1cb964ce2c178ee40a5d10a4a0",
          "tags": [
            "x_refsource_MISC"
          ]
        },
        {
          "url": "https://github.com/espressif/esp-idf/commit/aa0e3d75db995b7137b55349fc92ee684b47092d",
          "name": "https://github.com/espressif/esp-idf/commit/aa0e3d75db995b7137b55349fc92ee684b47092d",
          "tags": [
            "x_refsource_MISC"
          ]
        },
        {
          "url": "https://github.com/espressif/esp-idf/commit/b9ba1e29b65536ab4b670ac099585d09adce0376",
          "name": "https://github.com/espressif/esp-idf/commit/b9ba1e29b65536ab4b670ac099585d09adce0376",
          "tags": [
            "x_refsource_MISC"
          ]
        }
      ],
      "metrics": [
        {}
      ]
    }
  }
}