GHSA-373w-rj84-pv6x: SafeURL Python SafeURL-Python's Hostname Blocklist Does Not Vulnerability

LOW
Published
Advisory Summary

GHSA-373w-rj84-pv6x is a LOW safeurl-python's hostname blocklist does not vulnerability (General Security Weakness) affecting SafeURL Python libraries in the PyPI ecosystem. The issue involves safeurl-python's hostname blocklist does not block fqdns. Remediation is available by upgrading affected packages to version 1.3.

GHSA-373w-rj84-pv6x at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-373w-rj84-pv6x
Severity LOW
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product SafeURL Python
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix GHSA-373w-rj84-pv6x

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.

SafeURL-Python fixed: 1.3
pip install SafeURL-Python>=1.3
Verify Direct and Transitive Dependencies

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 GHSA-373w-rj84-pv6x, 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.3), 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 General Security Weakness. 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

### Description If a hostname was blacklisted, it was possible to bypass the blacklist by requesting the FQDN of the host (e.g. adding `.` to the end). ### Impact The main purpose of this library is to block requests to internal/private IPs and these cannot be bypassed using this finding. But if a library user had specifically set certain hostnames as blocked, then an attacker would be able to circumvent that block to cause SSRFs to request those hostnames. ### Patches Fixed by https://github.com/IncludeSecurity/safeurl-python/pull/6 ### Credit https://github.com/Sim4n6

GHSA-373w-rj84-pv6x Affected SafeURL Python Versions

1 component(s)
Fixed Versions:
1.3
Product / Package Ecosystem Affected Versions Fixed Version
SafeURL-Python
PyPI
< 1.3
1.3

References

Frequently Asked Questions

What is GHSA-373w-rj84-pv6x?
GHSA-373w-rj84-pv6x is a security vulnerability in SafeURL Python involving SafeURL-Python's hostname blocklist does not block FQDNs under General Security Weakness.
Which SafeURL Python versions are affected?
Affected versions include releases prior to 1.3 across affected packages: SafeURL-Python.
What version fixes GHSA-373w-rj84-pv6x?
Upgrading to 1.3 (or the latest patched release for your respective branch) resolves the vulnerability.
Is SafeURL-Python affected?
Yes, SafeURL-Python is affected in releases prior to 1.3. Upgrade your dependency to 1.3 or later.
What CWE is associated with GHSA-373w-rj84-pv6x?
GHSA-373w-rj84-pv6x is classified under General Security Weakness.
How can I check PyPI dependencies for GHSA-373w-rj84-pv6x?
Run the dependency tree command: 'pip show SafeURL-Python'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-373w-rj84-pv6x",
  "modified" : "2023-06-29T15:02:16Z",
  "published" : "2023-06-29T15:02:16Z",
  "aliases" : [ ],
  "summary" : "SafeURL-Python's hostname blocklist does not block FQDNs",
  "details" : "### Description\nIf a hostname was blacklisted, it was possible to bypass the blacklist by requesting the FQDN of the host (e.g. adding `.` to the end).\n\n### Impact\nThe main purpose of this library is to block requests to internal/private IPs and these cannot be bypassed using this finding. But if a library user had specifically set certain hostnames as blocked, then an attacker would be able to circumvent that block to cause SSRFs to request those hostnames.\n\n### Patches\nFixed by https://github.com/IncludeSecurity/safeurl-python/pull/6\n\n### Credit\nhttps://github.com/Sim4n6\n",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "SafeURL-Python"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.3"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/IncludeSecurity/safeurl-python/security/advisories/GHSA-373w-rj84-pv6x"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/IncludeSecurity/safeurl-python/pull/6"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/IncludeSecurity/safeurl-python/commit/c4f9677f8790a58eaa1953bac286cca75a5f580e"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/IncludeSecurity/safeurl-python"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-06-29T15:02:16Z",
    "nvd_published_at" : null
  }
}