github.com/gmrtd/gmrtd
Affected
- introduced
0, fixed0.17.2(semver)
Fixed versions
0.17.2
Fix
- Fixed version
0.17.2go get github.com/gmrtd/[email protected]
Advisory
Also known as: CVE-2026-24738, GO-2026-4379
gmrtd ReadFile Vulnerable to Denial of Service via Excessive TLV Length Values
Unbounded TLV length in ReadFile can cause Denial of Service
Summary
A Denial of Service vulnerability was identified in ReadFile() where unbounded TLV length values could lead to excessive CPU and memory usage when processing data from a malicious or non-compliant NFC source. This issue has been fixed by enforcing strict limits on acceptable TLV lengths.
Affected Versions
Details
ReadFile() processes BER-TLV encoded data returned from an NFC or APDU source via a Transceiver interface. Prior to the fix, the implementation did not enforce an upper bound on long-form TLV length values.
A malicious or non-compliant NFC endpoint could advertise an excessively large length (up to 4 GB), causing the library to:
While such lengths are unrealistic for compliant MRTD or ISO 7816 devices, they can be produced by emulated or malicious sources, or by untrusted inputs routed through higher-level APIs.
Impact
Applications using gmrtd to read data from NFC or APDU sources may experience:
No confidentiality or data integrity impact has been identified.
Resolution
This issue has been resolved in v0.17.2.
The fix introduces:
Recommendation
Users should upgrade to v0.17.2 or later.
No additional mitigation is required once the library is updated.
Credits
Discovered and reported by @ramrunner.
Medium Basis: The source's own band: MODERATE
0, fixed 0.17.2 (semver)0.17.2
0.17.2go get github.com/gmrtd/[email protected]Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0