GHSA-rcrv-228c-gprj: Bitlyshortener Invalid URL Generation Vulnerability

MODERATE
Published
Advisory Summary

GHSA-rcrv-228c-gprj is a MODERATE invalid url generation vulnerability (General Security Weakness) affecting Bitlyshortener libraries in the PyPI ecosystem. The issue involves invalid url generation in bitlyshortener. Remediation is available by upgrading affected packages to version 0.6.0.

GHSA-rcrv-228c-gprj at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-rcrv-228c-gprj
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification General Security Weakness
Affected Product Bitlyshortener
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix GHSA-rcrv-228c-gprj

To remediate this vulnerability, upgrade all affected Bitlyshortener dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

bitlyshortener fixed: 0.6.0
pip install bitlyshortener>=0.6.0
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 bitlyshortener

How to Check if You Are Affected

To determine whether your Python environment is affected by GHSA-rcrv-228c-gprj, inspect your installed packages using pip:

pip show bitlyshortener

Analyze the terminal output to locate any version of Bitlyshortener in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.6.0), your application is affected.

Note: The pip show bitlyshortener 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 Bitlyshortener, 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

### Impact Due to a sudden upstream breaking change by Bitly, versions of `bitlyshortener` <0.6.0 generate invalid short URLs. All users are affected and must update immediately. ### Patches Upgrading `bitlyshortener` to 0.6.0 or newer will prevent the generation such invalid short URLs. ### Workarounds A workaround is to replace "https://j.mp/" in each generated short URL with "https://bit.ly/". ### References * [Release notes](https://github.com/impredicative/bitlyshortener/releases)

GHSA-rcrv-228c-gprj Affected Bitlyshortener Versions

1 component(s)
Fixed Versions:
0.6.0
Product / Package Ecosystem Affected Versions Fixed Version
bitlyshortener
PyPI
< 0.6.0
0.6.0

References

Frequently Asked Questions

What is GHSA-rcrv-228c-gprj?
GHSA-rcrv-228c-gprj is a security vulnerability in Bitlyshortener involving Invalid URL generation in bitlyshortener under General Security Weakness.
Which Bitlyshortener versions are affected?
Affected versions include releases prior to 0.6.0 across affected packages: bitlyshortener.
What version fixes GHSA-rcrv-228c-gprj?
Upgrading to 0.6.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is bitlyshortener affected?
Yes, bitlyshortener is affected in releases prior to 0.6.0. Upgrade your dependency to 0.6.0 or later.
What CWE is associated with GHSA-rcrv-228c-gprj?
GHSA-rcrv-228c-gprj is classified under General Security Weakness.
How can I check PyPI dependencies for GHSA-rcrv-228c-gprj?
Run the dependency tree command: 'pip show bitlyshortener'. 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-rcrv-228c-gprj",
  "modified" : "2022-01-20T18:36:49Z",
  "published" : "2022-01-21T18:39:40Z",
  "aliases" : [ ],
  "summary" : "Invalid URL generation in bitlyshortener",
  "details" : "### Impact\nDue to a sudden upstream breaking change by Bitly, versions of `bitlyshortener` <0.6.0 generate invalid short URLs. All users are affected and must update immediately.\n\n### Patches\nUpgrading `bitlyshortener` to 0.6.0 or newer will prevent the generation such invalid short URLs.\n\n### Workarounds\nA workaround is to replace \"https://j.mp/\" in each generated short URL with \"https://bit.ly/\".\n\n### References\n* [Release notes](https://github.com/impredicative/bitlyshortener/releases)",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "bitlyshortener"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "0.6.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/impredicative/bitlyshortener/security/advisories/GHSA-rcrv-228c-gprj"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/impredicative/bitlyshortener/commit/b307d70bedf745305fa0dd3c5c600d8cb88d09b5"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/impredicative/bitlyshortener"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/impredicative/bitlyshortener/releases/tag/0.6.0"
  } ],
  "database_specific" : {
    "cwe_ids" : [ ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-01-20T18:36:49Z",
    "nvd_published_at" : null
  }
}