All advisories

Security advisoryCVE-2026-126049

Gwenhywfar 5.14.2 Use-After-Free via GWEN_TLV_Buffer_To_DB() Nested BER-TLV Parsing

Published:

Severity
Medium5.1
Vulnerability type
Use After Free (CWE-416)
Fixed in
Gwenhywfar 5.14.3
Credit
Discovered by Deus Rex Research
Published

CVSS 4.0 vector5.1 Medium

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

CVSS 3.1 vector4.6 Medium

CVSS:3.1/AV:P/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

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.

Affected versions

Gwenhywfar>= 5.14.2, < 5.14.3

Remediation

Fixed in Gwenhywfar 5.14.3. View the upstream fix (opens in a new tab)

References

Advisories may be reused freely, without charge or registration.

To report a vulnerability in Deus Rex, contact disclosure@cyrex.tech.