Vulnerabilities in pkg:pypi/safeurl-python
PACKAGECVE-2023-24622 is a MODERATE (CVSS 5.3) safeurl-python contains server-side request forgery vulnerability (CWE-918: Server-Side Request Forgery (SSRF)) affecting Safeurl python libraries in the PyPI ecosystem. The issue involves safeurl-python contains server-side request forgery. Remediation is available by upgrading affected packages to version 1.2.
pkg:pypi/safeurl-python
Vulnerability advisories affecting package pkg:pypi/safeurl-python. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-jgh8-vchw-q3g7 | CVE-2023-24622 | MODERATE | safeurl-python contains Server-Side Request Forgery |
| GHSA-rw83-v3pw-m362 | - | MODERATE | Withdrawn: safeurl-python contains Server-Side Request Forgery |
CVE-2023-24622 at a Glance
Security Impact
CVSS: 5.3
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N).
How to Fix CVE-2023-24622
To remediate this vulnerability, upgrade all affected Safeurl python dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install safeurl-python>=1.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show safeurl-python
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2023-24622, inspect your installed packages using pip:
pip show safeurl-python
Analyze the terminal output to locate any version of Safeurl python in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.2), your application is affected.
Note: The pip show safeurl-python command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-918: Server-Side Request Forgery (SSRF), where the web server receives a url or similar request from an upstream component and retrieves the contents of this url, but it does not sufficiently ensure that the request is being sent to the expected destination. In Safeurl python, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2023-24622 Affected Safeurl python Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
safeurl-python
|
PyPI |
< 1.2
|
1.2
|
References
Frequently Asked Questions
What is CVE-2023-24622?
Which Safeurl python versions are affected?
What version fixes CVE-2023-24622?
Is safeurl-python affected?
What is the CVSS score of CVE-2023-24622?
What CWE is associated with CVE-2023-24622?
How can I check PyPI dependencies for CVE-2023-24622?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-jgh8-vchw-q3g7",
"modified" : "2024-11-26T16:13:13Z",
"published" : "2023-01-27T01:04:27Z",
"aliases" : [ "CVE-2023-24622" ],
"summary" : "safeurl-python contains Server-Side Request Forgery",
"details" : "### Description\nIn 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.\n\n### Impact\nThe regex used was:\n\n`re.match(\"(?i)^%s\" % domain, value)`\n\nThis 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.\n\nTherefore, an allowlist of [\"victim.com\"] could allow the domain \"victimacomattacker.com\" to be requested.\n\nThis 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.\n\n### Patches\nFixed in https://github.com/IncludeSecurity/safeurl-python/pull/5\n\n### References\n[Server-side request forgery (SSRF)](https://portswigger.net/web-security/ssrf)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:L/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:L/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "safeurl-python"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/IncludeSecurity/safeurl-python/security/advisories/GHSA-jgh8-vchw-q3g7"
}, {
"type" : "WEB",
"url" : "https://github.com/IncludeSecurity/safeurl-python/pull/5/commits/42dd0c8e5fc84e17e1d3578d18aaea169eece474"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/IncludeSecurity/safeurl-python"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/safeurl-python/PYSEC-2023-298.yaml"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-918" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-01-27T01:04:27Z",
"nvd_published_at" : null
}
}