GHSA-rcrv-228c-gprj: Bitlyshortener Invalid URL Generation Vulnerability
MODERATEGHSA-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
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.
pip install bitlyshortener>=0.6.0
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
GHSA-rcrv-228c-gprj Affected Bitlyshortener Versions
1 component(s)| 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?
Which Bitlyshortener versions are affected?
What version fixes GHSA-rcrv-228c-gprj?
Is bitlyshortener affected?
What CWE is associated with GHSA-rcrv-228c-gprj?
How can I check PyPI dependencies for GHSA-rcrv-228c-gprj?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"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
}
}