---
id: "CVE-2026-126048"
page: "https://infrastack.ai/live/CVE-2026-126048"
kind: "vulnerability"
aliases: ["CVE-2026-126048"]
title: "Gwenhywfar: stack overflow in TLV parser lets a malicious chip card crash apps"
severity: "medium"
cvss: 5.1
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["banking-software", "c", "gwenhywfar", "libchipcard", "package"]
not_affected_if: ["no-chip-card-reading", "not-using-zka-driver"]
published_at: "2026-11-10T17:17:31+00:00"
first_seen_at: "2026-11-10T17:22:41+00:00"
updated_at: "2026-11-10T17:24:37+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-126048", "first_seen_at": "2026-11-10T17:22:41+00:00"}]
exploit_sources: []
---

# Gwenhywfar: stack overflow in TLV parser lets a malicious chip card crash apps

Link for people: https://infrastack.ai/live/CVE-2026-126048 (this .md is for agents)

Gwenhywfar, a C library used by banking and smart-card software, has a stack-based buffer overflow when decoding BER-TLV tags into a fixed 128-byte buffer. An attacker who supplies a crafted record, such as a malicious chip card's EF_SSD file read through libchipcard's ZKA driver, can crash the application.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed Gwenhywfar version with `pkg-config --modversion gwenhywfar` or `gwenhywfar-config --version`; versions before `5.14.2` are in the vulnerable range
- Look for libchipcard's ZKA driver in use on systems that read chip cards

## Fix

- Gwenhywfar: move to `5.14.2` or later

## Timeline

- 2026-11-10T17:22:41+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-126048

## Documents

- [advisory] Third-party advisory: www.vulncheck.com https://www.vulncheck.com/advisories/gwenhywfar-4.99-8beta-before-5.14.2-stack-buffer-overflow-via-gwen-tlv-buffer-to-db
- [fix] Patch: github.com https://github.com/aqbanking/gwenhywfar/commit/6b50388e6b4a96f02d3d56e1d7747405fa881f39
- [fix] Patch: github.com https://github.com/aqbanking/gwenhywfar/commit/ed8e2f8cdc27fd5c1b629cf9c1f6b93b2e009757

## From the sources

Gwenhywfar 4.99.8beta before 5.14.2 contains a stack-based buffer overflow in GWEN_TLV_Buffer_To_DB() in src/parser/tlv.c when decoding BER-TLV tags into a fixed 128-byte buffer. Attackers can supply a record with about 127 or more tag continuation bytes or a truncated multi-byte tag, such as via a malicious chip card's EF_SSD file read by libchipcard's ZKA driver, to crash the application.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
