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

exploitDog

github логотип

GHSA-jgh8-vchw-q3g7

Опубликовано: 27 янв. 2023
Источник: github
Github: Прошло ревью
CVSS4: 6.9
CVSS3: 5.3

Описание

safeurl-python contains Server-Side Request Forgery

Description

In SafeURL it is possible to specify a list of domains that should be matched before a request is sent out. The regex used to compare domains did not work as intended.

Impact

The regex used was:

re.match("(?i)^%s" % domain, value)

This has two problems, first that only the beginning and not the end of the string is anchored. Second, that a dot in the domain matches any character as part of regex syntax.

Therefore, an allowlist of ["victim.com"] could allow the domain "victimacomattacker.com" to be requested.

This has lower impact since the usual attacker aim in an SSRF is to request internal resources such as private IP addresses rather than an attacker's own domain. But, in a case where SafeURL had specifically been used to try to limit requests to a particular allowlist, say for example a PDF renderer, the finding would be more severe.

Patches

Fixed in https://github.com/IncludeSecurity/safeurl-python/pull/5

References

Server-side request forgery (SSRF)

Пакеты

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

safeurl-python

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

< 1.2

1.2

EPSS

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

6.9 Medium

CVSS4

5.3 Medium

CVSS3

Дефекты

CWE-918

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

CVSS3: 5.3
nvd
около 3 лет назад

isInList in the safeurl-python package before 1.2 for Python has an insufficiently restrictive regular expression for external domains, leading to SSRF.

EPSS

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

6.9 Medium

CVSS4

5.3 Medium

CVSS3

Дефекты

CWE-918