CVE-2023-28118
JSON

7.5high

kaml has potential denial of service while parsing input with anchors and aliases

Severity
7.5high CVSS:3.1 by GitHub_M
Exploit likelihood
0.97% (higher than 63% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
GitHub_M
Also known as
GHSA-c24f-2j3g-rg48

Description

kaml provides YAML support for kotlinx.serialization. Prior to version 0.53.0, applications that use kaml to parse untrusted input containing anchors and aliases may consume excessive memory and crash. Version 0.53.0 and later default to refusing to parse YAML documents containing anchors and aliases. There are no known workarounds.

Affected

Product or packageVersionsReported by
charleskorn kaml< 0.53.0CVE List
com.charleskorn.kaml:kaml (Maven)before 0.53.0GitHub Advisory Database
kaml_project kamlbefore 0.53.0NVD

All scores

GitHub_M7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
GitHub7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
NVD7.5high CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Classification

CWE-776

SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.

What each source says

CVE List

kaml provides YAML support for kotlinx.serialization. Prior to version 0.53.0, applications that use kaml to parse untrusted input containing anchors and aliases may consume excessive memory and crash. Version 0.53.0 and later default to refusing to parse YAML documents containing anchors and aliases. There are no known workarounds.

GitHub Advisory Database
Impact

Applications that use kaml to parse untrusted input containing anchors and aliases may consume excessive memory and crash.

Patches

Version 0.53.0 and later default to refusing to parse YAML documents containing anchors and aliases.

Workarounds

None.

References

Wikipedia has an explanation of this class of vulnerability: billion laughs attack

Acknowledgements

Thank you to @gdude2002 for reporting this issue.

References

Sources

SourceRecordLicence
CVE ListCVE-2023-28118 changed 2025-02-25CVE Terms of Use
GitHub Advisory DatabaseGHSA-c24f-2j3g-rg48 changed 2023-11-08CC-BY-4.0
NVDCVE-2023-28118 changed 2026-06-17Public domain