# CVE-2026-24738: gmrtd ReadFile Vulnerable to Denial of Service via Excessive TLV Length Values

> A malicious NFC tag can cause denial of service in applications using the gmrtd library by sending excessive TLV length values, leading to resource exhaustion.

- **Severity:** Medium 5.9 (`CVSS:4.0/AV:A/AC:L/AT:P/PR:N/UI:P/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 27 Jan 2026
- **Updated:** 28 Jan 2026
- **Also known as:** GHSA-j49h-6577-5xwq, GO-2026-4379

## What is CVE-2026-24738?

CVE-2026-24738 is a medium-severity denial of service vulnerability in gmrtd, published on 27 Jan 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.

### Official description

gmrtd is a Go library for reading Machine Readable Travel Documents (MRTDs). Prior to version 0.17.2, ReadFile accepts TLVs with lengths that can range up to 4GB, which can cause unconstrained resource consumption in both memory and cpu cycles. ReadFile can consume an extended TLV with lengths well outside what would be available in ICs. It can accept something all the way up to 4GB which would take too many iterations in 256 byte chunks, and would also try to allocate memory that might not be available in constrained environments like phones. Or if an API sends data  to ReadFile, the same problem applies. The very small chunked read also locks the goroutine in  accepting data for a very large number of iterations.  projects using the gmrtd library to read files from NFCs can experience extreme slowdowns or memory consumption. A malicious NFC can just behave like the mock transceiver described above and by just sending dummy bytes as each chunk to be read, can make the receiving thread unresponsive and fill up memory on the host system. Version 0.17.2 patches the issue.

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling), CWE-400 (Uncontrolled Resource Consumption)

## Which versions are affected by CVE-2026-24738?

3 open source packages ship an affected version, including github.com/gmrtd/gmrtd. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/gmrtd/gmrtd` | Go | All versions | 0.17.2 |
| `github.com/gmrtd/gmrtd` | Go | All versions | 0.17.2 |
| `github.com/gmrtd/gmrtd` | Go | All versions | 0.17.2 |

Products: Gmrtd Gmrtd.

## How do I fix CVE-2026-24738?

Upgrade github.com/gmrtd/gmrtd to 0.17.2 or later.

## Is CVE-2026-24738 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-24738 and fix it if it is affected.

What it is: CVE-2026-24738 is a medium-severity denial of service vulnerability in gmrtd, published on 27 Jan 2026. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2026-24738 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/gmrtd/gmrtd (Go): affected all versions; fixed in 0.17.2
- github.com/gmrtd/gmrtd (Go): affected all versions; fixed in 0.17.2
- github.com/gmrtd/gmrtd (Go): affected all versions; fixed in 0.17.2

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-2026-24738/ (Markdown: https://insights.sbomify.com/CVE-2026-24738/index.md)
```

## Sources

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

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