GHSA-w228-rfpx-fhm4: Cg Cg Vulnerable To An Open Vulnerability

MODERATE
CVSS 6.1
CWE-601
Published
Advisory Summary

GHSA-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.

GHSA-w228-rfpx-fhm4 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-w228-rfpx-fhm4
Severity MODERATE
CVSS v3.1 Base Score 6.1
CWE Classification CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
Affected Product Cg
Package Ecosystem PyPI
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required None (PR:N)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality Low (C:L)
Integrity Low (I:L)
Availability None (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.

cg fixed: 60.2.12
pip install cg>=60.2.12
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 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

### Summary A 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. ### PoC If you change the referer header, you will be redirected to that domain without verifying. https://github.com/Clinical-Genomics/cg/blob/master/cg/server/invoices/views.py#L173 ### Impact An 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.

GHSA-w228-rfpx-fhm4 Affected Cg Versions

1 component(s)
Fixed Versions:
60.2.12
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?
GHSA-w228-rfpx-fhm4 is a security vulnerability in Cg involving cg vulnerable to an Open Redirect Vulnerability on Referer Header under CWE-601: URL Redirection to Untrusted Site ('Open Redirect').
Which Cg versions are affected?
Affected versions include releases prior to 60.2.12 across affected packages: cg.
What version fixes GHSA-w228-rfpx-fhm4?
Upgrading to 60.2.12 (or the latest patched release for your respective branch) resolves the vulnerability.
Is cg affected?
Yes, cg is affected in releases prior to 60.2.12. Upgrade your dependency to 60.2.12 or later.
What is the CVSS score of GHSA-w228-rfpx-fhm4?
GHSA-w228-rfpx-fhm4 has a CVSS v3.1 base score of 6.1 (MODERATE) with vector string CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N.
What CWE is associated with GHSA-w228-rfpx-fhm4?
GHSA-w228-rfpx-fhm4 is classified under CWE-601: URL Redirection to Untrusted Site ('Open Redirect') (The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.).
How can I check PyPI dependencies for GHSA-w228-rfpx-fhm4?
Run the dependency tree command: 'pip show cg'. 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-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
  }
}