# CVE-2022-21744: Memory corruption in MT2731, MT2735, MT6297, MT6725, MT6735, MT6737, MT6739, MT6750, MT6750S, MT6755, MT6757, MT6757P, MT6758, MT6761, MT6762, MT6762D, MT6762M, MT6763, MT6765, MT6765T, MT6767, MT6768, MT6769, MT6769T, MT6769Z, MT6771, MT6775, MT6779, MT6781, MT6783, MT6785, MT6785T, MT6789, MT6797, MT6799, MT6833, MT6853, MT6855, MT6873, MT6875, MT6877, MT6879, MT6880, MT6883, MT6885, MT6889, MT6890, MT6891, MT6893, MT6895, MT6983, MT8666, MT8667, MT8675, MT8735A, MT8735B, MT8765, MT8766, MT8768, MT8771, MT8781, MT8786, MT8788, MT8789, MT8791, MT8797

> Remote attackers can execute arbitrary code on MediaTek devices by exploiting an out-of-bounds write in the 2G modem firmware without user interaction.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 6 Jul 2022
- **Updated:** 3 Aug 2024
- **Also known as:** A-231281131, ASB-A-231281131, GHSA-x3q2-q8jj-f7gj, M-MOLY00810064

## What is CVE-2022-21744?

CVE-2022-21744 is a critical memory corruption vulnerability in Mediatek Nr15, published on 6 Jul 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

In Modem 2G RR, there is a possible out of bounds write due to a missing bounds check. This could lead to remote code execution when decoding GPRS Packet Neighbour Cell Data (PNCD) improper neighbouring cell size with no additional execution privileges needed. User interaction is not needed for exploitation. Patch ID: MOLY00810064; Issue ID: ALPS06641626.

Weakness: CWE-787 (Out-of-bounds Write)

## Which versions are affected by CVE-2022-21744?

It affects 7 products.


Products: Mediatek Lr11, Mediatek Lr12, Mediatek Lr12a, Mediatek Lr13, Mediatek Lr9, Mediatek Nr15, Mediatek Nr16.

## How do I fix CVE-2022-21744?

Apply the vendor's patch.

## Is CVE-2022-21744 being exploited?

There is no known exploitation of CVE-2022-21744 in the wild and no public exploit code.

## Other vulnerabilities in Mediatek Nr15

- [CVE-2022-20083](https://insights.sbomify.com/CVE-2022-20083/): Memory corruption in MT2731, MT2735, MT6297, MT6725, MT6735, MT6737, MT6739, MT6750, MT6750S, MT6755, MT6757, MT6757P, MT6758, MT6761, MT6762, MT6762D, MT6762M, MT6763, MT6765, MT6765T, MT6767, MT6768, MT6769, MT6769T, MT6769Z, MT6771, MT6775, MT6779, MT6781, MT6783, MT6785, MT6785T, MT6789, MT6797, MT6799, MT6833, MT6853, MT6855, MT6873, MT6875, MT6877, MT6879, MT6880, MT6883, MT6885, MT6889, MT6890, MT6891, MT6893, MT6895, MT6983, MT8666, MT8667, MT8675, MT8735A, MT8735B, MT8765, MT8766, MT8768, MT8771, MT8781, MT8786, MT8788, MT8789, MT8791, MT8797 (critical 9.8)
- [CVE-2023-20819](https://insights.sbomify.com/CVE-2023-20819/): Memory corruption in MT2731, MT6570, MT6580, MT6595, MT6732, MT6735, MT6737, MT6737M, MT6738, MT6739, MT6750, MT6750S, MT6752, MT6753, MT6755, MT6757, MT6758, MT6761, MT6762, MT6762D, MT6762M, MT6763, MT6765, MT6765T, MT6767, MT6768, MT6769, MT6769T, MT6769Z, MT6771, MT6775, MT6779, MT6781, MT6783, MT6785, MT6785T, MT6789, MT6795, MT6797, MT6799, MT6813, MT6815, MT6833, MT6835, MT6853, MT6855, MT6873, MT6875, MT6875T, MT6877, MT6878, MT6879, MT6883, MT6885, MT6886, MT6889, MT6891, MT6893, MT6895, MT6895T, MT6896, MT6897, MT6983, MT6985, MT6989, MT8666, MT8666A, MT8667, MT8673, MT8675, MT8765, MT8766, MT8766Z, MT8768, MT8768A, MT8768B, MT8768T, MT8768Z, MT8781, MT8786, MT8788, MT8788T, MT8788X, MT8788Z, MT8791, MT8791T, MT8797, MT8798 (medium 6.7)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-21744 and fix it if it is affected.

What it is: CVE-2022-21744 is a critical memory corruption vulnerability in Mediatek Nr15, published on 6 Jul 2022. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2022-21744 in the wild and no public exploit code.

Affected product: Mediatek Nr15. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2022-21744/ (Markdown: https://insights.sbomify.com/CVE-2022-21744/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2022-21744
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2022-21744
- OSV: https://osv.dev/vulnerability/CVE-2022-21744

---
From sbomify Insights: https://insights.sbomify.com/CVE-2022-21744/
Summaries are generated and may contain mistakes; the official description above is the record.
