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

exploitDog

github логотип

GHSA-h352-g5vw-3926

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

Описание

Improper Input Validation in fruity

Methods of NSString for conversion to a string may return a partial result. Since they call CStr::from_ptr on a pointer to the string buffer, the string is terminated at the first null byte, which might not be the end of the string.

In addition to the vulnerable functions listed for this issue, the implementations of Display, PartialEq, PartialOrd, and ToString for NSString are also affected, since they call those functions.

Since NSString is commonly used as the type for paths by the Foundation framework, null byte truncation might allow for easily bypassing file extension checks. For example, if a file name is provided by a user and validated to have one of a specific set of extensions, with validation taking place before truncation, an attacker can add an accepted extension after a null byte (e.g., file.exe\0.txt). After truncation, the file name used by the application would be file.exe.

It would be better to generate unique names for files, instead of using user-provided names, but not all applications take this approach.

Пакеты

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

fruity

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

>= 0.1.0, < 0.3.0

0.3.0

EPSS

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

7.5 High

CVSS3

Дефекты

CWE-20

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

CVSS3: 7.5
nvd
около 4 лет назад

An issue was discovered in the fruity crate through 0.2.0 for Rust. Security-relevant validation of filename extensions is plausibly affected. Methods of NSString for conversion to a string may return a partial result. Because they call CStr::from_ptr on a pointer to the string buffer, the string is terminated at the first '\0' byte, which might not be the end of the string.

EPSS

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

7.5 High

CVSS3

Дефекты

CWE-20