Логотип exploitDog
Консоль
Логотип exploitDog

exploitDog

github логотип

GHSA-fmm9-3gv8-58f4

Опубликовано: 07 сент. 2021
Источник: github
Github: Прошло ревью
CVSS3: 4.3

Описание

Improper Handling of Missing Values in kaml

Impact

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, for example:

!<x>

The following is a sample application that demonstrates this issue:

import com.charleskorn.kaml.Yaml import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @Serializable private sealed class K { @Serializable @SerialName("x") data class X( val property: String? = null, ) : K() } const val s = """ !<x> """ fun main() { println("Started.") val result = Yaml.default.decodeFromString(K.serializer(), s) println("Finished, result is $result") }

On vulnerable versions of kaml, the decodeFromString() operation hangs and never returns.

Patches

Version 0.35.3 or later contain the fix for this issue.

Пакеты

Наименование

com.charleskorn.kaml:kaml

maven
Затронутые версииВерсия исправления

< 0.35.2

0.35.3

EPSS

Процентиль: 65%
0.00485
Низкий

4.3 Medium

CVSS3

Дефекты

CWE-230
CWE-835

Связанные уязвимости

CVSS3: 4.3
nvd
больше 4 лет назад

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.

EPSS

Процентиль: 65%
0.00485
Низкий

4.3 Medium

CVSS3

Дефекты

CWE-230
CWE-835