CVE-2023-40110: Heap-buffer-overflow in android::MtpPacket::setContainerCode

platform/frameworks/av Updated 02 Oct 2025

Summary

01/11/2023
Yes i
High
Not published

CVE-2023-40110: In multiple functions of MtpPacket.cpp, there is a possible out of bounds write due to a heap buffer overflow. Affects platform/frameworks/av across 5 version ranges.

>= 11:0, < 11:2023-11-01 >= 12:0, < 12:2023-11-01 >= 12L:0, < 12L:2023-11-01 >= 13:0, < 13:2023-11-01 >= 14:0, < 14:2023-11-01

Fixed in 11:2023-11-01. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

The package under scrutiny is platform/frameworks/av in the Android ecosystem. This package is responsible for handling audio and video functionalities in the Android operating system. It provides APIs and components for media playback, recording, and streaming. The vulnerability affects multiple functions in the MtpPacket.cpp file, specifically related to the handling of MTP (Media Transfer Protocol) packets. MTP is a protocol used for transferring media files between devices. The vulnerability allows for a heap buffer overflow, which can lead to a local escalation of privilege. Exploitation of this vulnerability requires user interaction.

Vulnerability Detail

The vulnerability in the platform/frameworks/av package arises from a heap buffer overflow in the android::MtpPacket::setContainerCode function. This function, along with other related functions in MtpPacket.cpp, fails to properly validate the size of the buffer before writing data to it. As a result, an attacker can craft a malicious MTP packet that triggers an out-of-bounds write, potentially overwriting adjacent memory regions. This can lead to arbitrary code execution or other security consequences. The vulnerability has a high severity rating and affects multiple Android versions (11, 12, 12L, 13, 14). The issue has been fixed in the latest versions of the package.

How To Fix

Minimum fixed version

11:2023-11-01

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability. However, as a general best practice, users can mitigate the risk by avoiding untrusted MTP connections or media files from unknown sources. Additionally, keeping the device's operating system and all software components up to date can help protect against known vulnerabilities.

Conclusion

In conclusion, the platform/frameworks/av package in the Android ecosystem is vulnerable to a heap buffer overflow in the android::MtpPacket::setContainerCode function. This vulnerability can lead to local privilege escalation, but it requires user interaction for exploitation. It is crucial to update to the latest version of the package to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for platform/frameworks/av →

Share this vulnerability

FAQ

The vulnerability allows for a local escalation of privilege, potentially enabling an attacker to execute arbitrary code or perform unauthorized actions on the affected device.

Yes, user interaction is needed for exploitation. The vulnerability cannot be exploited without user involvement, such as connecting the device to a malicious MTP source or opening a malicious media file.

The vulnerability affects Android versions 11, 12, 12L, 13, and 14.

Yes, the vulnerability has been fixed in the latest versions of the platform/frameworks/av package.

More information about the fix can be found in the commit with the SHA-1 hash 53243faf690a49e00952b3d3956d2fff0b8d4a3c.

Related vulnerabilities

Recent vulnerabilities recorded for platform/frameworks/av.

How To Fix

Minimum fixed version

11:2023-11-01

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback