CVE-2023-21085: Out of Bounds Write in libnfc-nci

platform/system/nfc Updated 02 Oct 2025

Summary

01/04/2023
Yes i
Critical
Not published

CVE-2023-21085: In nci_snd_set_routing_cmd of nci_hmsgs.cc, there is a possible out of bounds write due to a missing bounds check. Affects platform/system/nfc across 5 version ranges.

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

Fixed in 13-next:2023-04-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 Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

The libnfc-nci package is a component of the Android ecosystem that provides NFC (Near Field Communication) functionality. NFC allows for short-range communication between devices, enabling features such as contactless payments and data transfer. The libnfc-nci package is responsible for handling NFC communication protocols and managing the routing of NFC messages. It is a critical component for NFC-enabled devices running Android.

Vulnerability Detail

The vulnerability, identified as CVE-2023-21085, resides in the nci_snd_set_routing_cmd function of the nci_hmsgs.cc file in libnfc-nci. It is caused by a missing bounds check, which can result in an out of bounds write. An attacker in close proximity to the affected device can exploit this vulnerability to execute arbitrary code remotely, without requiring any additional execution privileges. Notably, user interaction is not necessary for the successful exploitation of this vulnerability.

How To Fix

Minimum fixed version

13-next:2023-04-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

As a temporary workaround, users can disable NFC functionality on their devices to mitigate the risk of exploitation. However, this may impact the usability of NFC-related features and should only be considered as a temporary measure until the package can be updated to a fixed version.

Conclusion

The vulnerability in libnfc-nci poses a critical risk as it allows for remote code execution without user interaction. It is crucial to update the libnfc-nci package to a fixed version to mitigate this vulnerability. In the meantime, disabling NFC functionality can serve as a temporary workaround. For further assistance and support in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for platform/system/nfc →

Share this vulnerability

FAQ

Libnfc-nci is a component of the Android ecosystem that enables NFC functionality on devices. It handles NFC communication protocols and message routing.

The vulnerability allows for remote code execution by an attacker in close proximity to the affected device. No additional execution privileges are required, and user interaction is not necessary for exploitation.

To fix this vulnerability, update the libnfc-nci package to a version that includes the necessary security patches. Refer to the provided fix versions for the Android Open Source Project (AOSP).

As a temporary workaround, users can disable NFC functionality on their devices. However, this may impact the usability of NFC-related features.

For more information about this vulnerability, you can refer to the provided source link in the database_specific section of the vulnerability details.

Related vulnerabilities

Recent vulnerabilities recorded for platform/system/nfc.

How To Fix

Minimum fixed version

13-next:2023-04-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