CVE-2026-24738: Github.com/gmrtd/gmrtd Denial of Service Vulnerability

MODERATE
Advisory Identifier: GHSA-j49h-6577-5xwq
CWE-400 CWE-770
Published
Advisory Summary

CVE-2026-24738 is a MODERATE denial of service vulnerability (CWE-400: Uncontrolled Resource Consumption) affecting Github.com/gmrtd/gmrtd libraries in the Go ecosystem. The issue involves gmrtd readfile vulnerable to denial of service via excessive tlv length values. Remediation is available by upgrading affected packages to version 0.17.2.

CVE-2026-24738 at a Glance

CVE Identifier CVE-2026-24738
GHSA Identifier GHSA-j49h-6577-5xwq
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-400: Uncontrolled Resource Consumption
Affected Product Github.com/gmrtd/gmrtd
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2026-24738

To remediate this vulnerability, upgrade all affected Github.com/gmrtd/gmrtd dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/gmrtd/gmrtd fixed: 0.17.2
Upgrade github.com/gmrtd/gmrtd to 0.17.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/gmrtd/gmrtd

How to Check if You Are Affected

To determine whether your application is affected by CVE-2026-24738, inspect your project dependencies for Github.com/gmrtd/gmrtd:

inspect dependencies for github.com/gmrtd/gmrtd

Analyze the terminal output to locate any version of Github.com/gmrtd/gmrtd in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.17.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-400: Uncontrolled Resource Consumption, where the product does not properly control the allocation and maintenance of a limited resource. In Github.com/gmrtd/gmrtd, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

# 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 - **Affected:** All versions prior to **v0.17.2** - **Fixed in:** **v0.17.2** ## 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: - Perform a very large number of read iterations - Allocate excessive memory - Consume significant CPU resources - Block execution for an extended period 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: - Excessive CPU usage - Memory exhaustion - Application hangs or denial of service No confidentiality or data integrity impact has been identified. ## Resolution This issue has been resolved in **v0.17.2**. The fix introduces: - Enforcement of maximum allowable TLV lengths - Upper bounds on the number of read operations required to retrieve a file - Rejection of APDUs that exceed the requested response length ## 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**.

CVE-2026-24738 Affected Github.com/gmrtd/gmrtd Versions

1 component(s)
Fixed Versions:
0.17.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/gmrtd/gmrtd
Go
< 0.17.2
0.17.2

References

Frequently Asked Questions

What is CVE-2026-24738?
CVE-2026-24738 is a security vulnerability in Github.com/gmrtd/gmrtd involving gmrtd ReadFile Vulnerable to Denial of Service via Excessive TLV Length Values under CWE-400: Uncontrolled Resource Consumption.
Which Github.com/gmrtd/gmrtd versions are affected?
Affected versions include releases prior to 0.17.2 across affected packages: github.com/gmrtd/gmrtd.
What version fixes CVE-2026-24738?
Upgrading to 0.17.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/gmrtd/gmrtd affected?
Yes, github.com/gmrtd/gmrtd is affected in releases prior to 0.17.2. Upgrade your dependency to 0.17.2 or later.
What CWE is associated with CVE-2026-24738?
CVE-2026-24738 is classified under CWE-400: Uncontrolled Resource Consumption (The product does not properly control the allocation and maintenance of a limited resource.).
How can I check Go dependencies for CVE-2026-24738?
Run the dependency tree command: 'inspect dependencies for github.com/gmrtd/gmrtd'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-j49h-6577-5xwq",
  "modified" : "2026-01-29T03:40:19Z",
  "published" : "2026-01-27T00:57:19Z",
  "aliases" : [ "CVE-2026-24738" ],
  "summary" : "gmrtd ReadFile Vulnerable to Denial of Service via Excessive TLV Length Values",
  "details" : "# Unbounded TLV length in ReadFile can cause Denial of Service\n\n## Summary\n\nA 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.\n\n## Affected Versions\n\n- **Affected:** All versions prior to **v0.17.2**\n- **Fixed in:** **v0.17.2**\n\n## Details\n\n`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.\n\nA malicious or non-compliant NFC endpoint could advertise an excessively large length (up to 4 GB), causing the library to:\n\n- Perform a very large number of read iterations  \n- Allocate excessive memory  \n- Consume significant CPU resources  \n- Block execution for an extended period  \n\nWhile 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.\n\n## Impact\n\nApplications using `gmrtd` to read data from NFC or APDU sources may experience:\n\n- Excessive CPU usage  \n- Memory exhaustion  \n- Application hangs or denial of service  \n\nNo confidentiality or data integrity impact has been identified.\n\n## Resolution\n\nThis issue has been resolved in **v0.17.2**.\n\nThe fix introduces:\n\n- Enforcement of maximum allowable TLV lengths  \n- Upper bounds on the number of read operations required to retrieve a file  \n- Rejection of APDUs that exceed the requested response length  \n\n## Recommendation\n\nUsers should **upgrade to v0.17.2 or later**.\n\nNo additional mitigation is required once the library is updated.\n\n## Credits\n\nDiscovered and reported by **@ramrunner**.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "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"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/gmrtd/gmrtd"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.17.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/gmrtd/gmrtd/security/advisories/GHSA-j49h-6577-5xwq"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-24738"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gmrtd/gmrtd/commit/54469a95e5a20a8602ac1457b2110bfeb80c8891"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/gmrtd/gmrtd"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/gmrtd/gmrtd/releases/tag/v0.17.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-400", "CWE-770" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-01-27T00:57:19Z",
    "nvd_published_at" : "2026-01-27T21:16:03Z"
  }
}