{"id":"CVE-2026-126049","kind":"vulnerability","aliases":["CVE-2026-126049"],"related":[],"title":"Gwenhywfar: heap use-after-free in TLV parser lets crafted data corrupt memory","description":"Gwenhywfar 5.14.2 contains a heap use-after-free vulnerability in GWEN_TLV_Buffer_To_DB() in src/parser/tlv.c, which frees a nested record's GWEN_DB node when parsing of its contents fails but continues processing and adds the freed node to the parent instead of returning. Attackers can supply a constructed BER-TLV record with unparseable contents, such as via a malicious chip card read by libchipcard, to corrupt heap memory.","summary":"Gwenhywfar 5.14.2 frees a nested GWEN_DB node when a BER-TLV record fails to parse, then keeps using it, causing a heap use-after-free in GWEN_TLV_Buffer_To_DB(). An attacker who supplies a constructed TLV record, for example through a malicious chip card read by libchipcard, can corrupt heap memory.","severity":"medium","cvss":5.1,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["c","gwenhywfar","libchipcard","package"],"not_affected_if":["no-tlv-parsing"],"how_to_check":null,"fix":null,"status":"open","published_at":"2026-11-10T17:17:31+00:00","first_seen_at":"2026-11-10T17:22:41+00:00","triaged_at":"2026-11-10T17:24:36+00:00","updated_at":"2026-11-10T17:24:36+00:00","category":"package","confidence":0.5,"triage":{"at":"2026-11-10T17:24:36Z","model":"claude-haiku-5-5","output":{"fix":"unknown","reach":"local","title":"Gwenhywfar: heap use-after-free in TLV parser lets crafted data corrupt memory","impact":"high","summary":"Gwenhywfar 5.14.2 frees a nested GWEN_DB node when a BER-TLV record fails to parse, then keeps using it, causing a heap use-after-free in GWEN_TLV_Buffer_To_DB(). An attacker who supplies a constructed TLV record, for example through a malicious chip card read by libchipcard, can corrupt heap memory.","audience":"businesses","category":"package","nicknames":[],"who_cares":["gwenhywfar","libchipcard","c"],"confidence":0.5,"fix_status":"unknown","needs_auth":"no","worst_case":"heap memory corruption from crafted chip card data","analyst_note":"Confirm affected and fixed versions from the linked patch commits on github.com and the VulnCheck advisory; the sources here give no version range.","how_to_check":"unknown","plain_action":"","product_name":"","needs_analyst":true,"not_affected_if":["no-tlv-parsing"],"who_is_affected":"Applications that use Gwenhywfar to parse BER-TLV data, including banking and chip card software built on libchipcard, are exposed when they process untrusted TLV input. Systems that do not parse TLV data through this library can skip it. The sources do not state which versions beyond 5.14.2 are affected or fixed.","user_interaction":"unknown","product_ecosystem":"","needs_special_setup":"unknown","severity_if_unknown":"medium"},"cost_usd":0.000738,"input_tokens":4691,"output_tokens":538,"severity_before":"medium"},"analyst_status":null,"analyst_note":null,"search":"'-126049':17A,20A '-2026':16A,19A '5.14.2':26B,82C 'add':118C 'attack':60B,128C 'ber':36B,134C 'ber-tlv':35B,133C 'buffer':56B,94C 'c':21B 'card':73B,146C 'caus':46B 'chip':72B,145C 'construct':64B,132C 'contain':83C 'content':112C,139C 'continu':115C 'corrupt':13A,78B,151C 'craft':11A 'cve':15A,18A 'data':12A 'db':31B,58B,96C,106C 'exampl':68B 'fail':39B,113C 'free':6A,27B,52B,89C,100C 'freed':120C 'gwen':30B,54B,92C,105C 'gwenhywfar':1A,22B,25B,81C 'heap':2A,48B,79B,85C,152C 'instead':125C 'keep':43B 'let':10A 'libchipcard':23B,76B,149C 'malici':71B,144C 'memori':14A,80B,153C 'nest':29B,102C 'node':32B,107C,121C 'packag':24B 'parent':124C 'pars':41B,109C 'parser':9A 'process':116C 'read':74B,147C 'record':38B,66B,103C,136C 'return':127C 'src/parser/tlv.c':98C 'suppli':62B,130C 'tlv':8A,37B,55B,65B,93C,135C 'unpars':138C 'use':4A,44B,50B,87C 'use-after-fre':3A,49B,86C 'via':142C 'vulner':90C","nicknames":[],"mitigations":[],"who_affected":"Applications that use Gwenhywfar to parse BER-TLV data, including banking and chip card software built on libchipcard, are exposed when they process untrusted TLV input. Systems that do not parse TLV data through this library can skip it. The sources do not state which versions beyond 5.14.2 are affected or fixed.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"none","audience":"businesses","plain_action":null,"pkeys":[],"ptokens":[],"labels":["c","gwenhywfar","libchipcard","medium","package"],"campaign_type":null,"search_a":"'-126049':17A,20A '-2026':16A,19A 'corrupt':13A 'craft':11A 'cve':15A,18A 'data':12A 'free':6A 'gwenhywfar':1A 'heap':2A 'let':10A 'memori':14A 'parser':9A 'tlv':8A 'use':4A 'use-after-fre':3A","search_b":"'5.14.2':26B 'attack':60B 'ber':36B 'ber-tlv':35B 'buffer':56B 'c':21B 'card':73B 'caus':46B 'chip':72B 'construct':64B 'corrupt':78B 'db':31B,58B 'exampl':68B 'fail':39B 'free':27B,52B 'gwen':30B,54B 'gwenhywfar':22B,25B 'heap':48B,79B 'keep':43B 'libchipcard':23B,76B 'malici':71B 'memori':80B 'nest':29B 'node':32B 'packag':24B 'pars':41B 'read':74B 'record':38B,66B 'suppli':62B 'tlv':37B,55B,65B 'use':44B,50B 'use-after-fre':49B","search_c":"'5.14.2':82C 'add':118C 'attack':128C 'ber':134C 'ber-tlv':133C 'buffer':94C 'card':146C 'chip':145C 'construct':132C 'contain':83C 'content':112C,139C 'continu':115C 'corrupt':151C 'db':96C,106C 'fail':113C 'free':89C,100C 'freed':120C 'gwen':92C,105C 'gwenhywfar':81C 'heap':85C,152C 'instead':125C 'libchipcard':149C 'malici':144C 'memori':153C 'nest':102C 'node':107C,121C 'parent':124C 'pars':109C 'process':116C 'read':147C 'record':103C,136C 'return':127C 'src/parser/tlv.c':98C 'suppli':130C 'tlv':93C,135C 'unpars':138C 'use':87C 'use-after-fre':86C 'via':142C 'vulner':90C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-11-10T17:17:31+00:00","kev":null,"cvss_vector":"CVSS:4.0/AV:P/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"disclosure@vulncheck.com","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-126049","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-126049","severity":null,"published_at":"2026-11-10T17:17:31+00:00","modified_at":"2026-11-10T17:17:31+00:00","first_seen_at":"2026-11-10T17:22:41+00:00","fetched_at":"2026-11-10T17:22:41+00:00","note":null}],"documents":[{"id":116515,"url":"https://github.com/aqbanking/gwenhywfar/commit/828b34135dfa33fc347a2929caa2f079ffb00738","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":116516,"url":"https://github.com/aqbanking/gwenhywfar/commit/dc8b80945e877f5bdf2d2ae1b50c928c15e990b0","title":"Patch: github.com","kind":"other","source":"nvd","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Patch: github.com"},{"id":116517,"url":"https://www.vulncheck.com/advisories/gwenhywfar-5.14.2-use-after-free-via-gwen-tlv-buffer-to-db-nested-ber-tlv-parsing","title":"Third-party advisory: www.vulncheck.com","kind":"advisory","source":"nvd","publisher":"research","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Third-party advisory: www.vulncheck.com"}],"disclosures":[],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}