Vulnerabilities in pkg:pypi/cg
PACKAGEGHSA-w228-rfpx-fhm4 is a MODERATE (CVSS 6.1) cg vulnerable to an open vulnerability (CWE-601: URL Redirection to Untrusted Site ('Open Redirect')) affecting Cg libraries in the PyPI ecosystem. The issue involves cg vulnerable to an open redirect vulnerability on referer header. Remediation is available by upgrading affected packages to version 60.2.12.
pkg:pypi/cg
Vulnerability advisories affecting package pkg:pypi/cg. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-w228-rfpx-fhm4 | - | MODERATE | cg vulnerable to an Open Redirect Vulnerability on Referer Header |
GHSA-w228-rfpx-fhm4 at a Glance
Security Impact
CVSS: 6.1
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:R/S:C/C:L/I:L/A:N).
How to Fix GHSA-w228-rfpx-fhm4
To remediate this vulnerability, upgrade all affected Cg 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 cg>=60.2.12
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show cg
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-w228-rfpx-fhm4, inspect your installed packages using pip:
pip show cg
Analyze the terminal output to locate any version of Cg in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 60.2.12), your application is affected.
Note: The pip show cg command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect'), where the web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect. In Cg, 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-w228-rfpx-fhm4 Affected Cg Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
cg
|
PyPI |
< 60.2.12
|
60.2.12
|
References
Frequently Asked Questions
What is GHSA-w228-rfpx-fhm4?
Which Cg versions are affected?
What version fixes GHSA-w228-rfpx-fhm4?
Is cg affected?
What is the CVSS score of GHSA-w228-rfpx-fhm4?
What CWE is associated with GHSA-w228-rfpx-fhm4?
How can I check PyPI dependencies for GHSA-w228-rfpx-fhm4?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-w228-rfpx-fhm4",
"modified" : "2024-04-23T16:21:22Z",
"published" : "2024-04-23T16:21:22Z",
"aliases" : [ ],
"summary" : "cg vulnerable to an Open Redirect Vulnerability on Referer Header",
"details" : "### Summary\n\nA vulnerability has been discovered in the handling of the referrer header in the application, which could allow an attacker to conduct open redirects. The issue arises from improper validation of the referrer header in certain conditions. By manipulating the referrer header, an attacker could potentially redirect users to malicious websites, phishing pages, or other dangerous destinations.\n\n### PoC\n\nIf you change the referer header, you will be redirected to that domain without verifying.\n\nhttps://github.com/Clinical-Genomics/cg/blob/master/cg/server/invoices/views.py#L173\n\n### Impact\n\nAn attacker exploiting this vulnerability could trick users into visiting malicious websites or disclose sensitive information by redirecting them to unintended destinations. This could lead to various attacks including phishing, malware distribution, or further exploitation of other vulnerabilities.",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "cg"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "60.2.12"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/Clinical-Genomics/cg/security/advisories/GHSA-w228-rfpx-fhm4"
}, {
"type" : "WEB",
"url" : "https://github.com/Clinical-Genomics/cg/commit/96e6a968a5a3639cc40ad251ad65952e4f38dd25"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/Clinical-Genomics/cg"
}, {
"type" : "WEB",
"url" : "https://github.com/Clinical-Genomics/cg/blob/master/cg/server/invoices/views.py#L173"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-601" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2024-04-23T16:21:22Z",
"nvd_published_at" : null
}
}