{"id":"CVE-2021-39194","published":"2021-09-07T19:25:10Z","modified":"2024-08-04T01:58:18Z","title":"Denial of service while parsing polymorphic input with tagged polymorphism style in kaml","vendor":"charleskorn","product":"kaml","tier":"tail","description":{"text":"kaml is an open source implementation of the YAML format with support for kotlinx.serialization. In affected versions attackers that could provide arbitrary YAML input to an application that uses kaml could cause the application to endlessly loop while parsing the input. This could result in resource starvation and denial of service. This only affects applications that use polymorphic serialization with the default tagged polymorphism style. Applications using the property polymorphism style are not affected. YAML input for a polymorphic type that provided a tag but no value for the object would trigger the issue. Version 0.35.3 or later contain the fix for this issue.","provenance":"source","from":"CVE.org"},"cvss":{"score":4.3,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01658,"percentile":0.77223,"provenance":"source"},"cwes":[{"id":"CWE-835","name":"Loop with Unreachable Exit Condition"}],"references":[{"url":"https://github.com/charleskorn/kaml/security/advisories/GHSA-fmm9-3gv8-58f4","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/charleskorn/kaml/issues/179","tags":["x_refsource_MISC"]},{"url":"https://github.com/charleskorn/kaml/commit/e18785d043fc6324c81e968aae9764b4b060bc6a","tags":["x_refsource_MISC"]}],"priority":{"score":18.5,"factors":[{"name":"EPSS percentile","points":15.44},{"name":"CVSS severity","points":3.01}]},"vendorSlug":"charleskorn","affectedVersions":[{"vendor":"charleskorn","product":"kaml","versions":["< 0.35.2"]}],"affected":[{"ecosystem":"Maven","package":"com.charleskorn.kaml:kaml","vulnerableRanges":["<0.35.3"],"patched":["0.35.3"],"from":["GHSA-fmm9-3gv8-58f4"],"provenance":"source"}],"summary":{"text":"The kaml library, a YAML implementation for kotlinx.serialization by charleskorn, contains an infinite-loop flaw in its parser when handling polymorphic types that use the default tagged polymorphism style. An attacker able to supply YAML input to an application that deserializes such polymorphic types can trigger the loop by providing a tag with no accompanying object value, causing resource starvation and denial of service; the attack requires low privileges over the network with no user interaction, and applications using the property polymorphism style are not affected.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:40:22Z"},"euvd":{"id":"EUVD-2021-2055","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-charleskorn-kaml-cve-2021-39194","children":[{"from":"CVE-2021-39194","to":"CVE-2023-28118","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["src/commonTest/kotlin/com/charleskorn/kaml/YamlReadingTest.kt"],"commits":["https://github.com/charleskorn/kaml/commit/e18785d043fc6324c81e968aae9764b4b060bc6a","https://github.com/charleskorn/kaml/commit/5f82a2d7e00bfc307afca05d1dc4d7c50593531a"],"basis":"rarely changed file"}]}]}}