GHSA-c58j-88f5-h53f: Pycares Cross-Site Scripting Vulnerability
MODERATEGHSA-c58j-88f5-h53f is a MODERATE (CVSS 5.6) cross-site scripting vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting Pycares libraries in the PyPI ecosystem. The issue involves improper neutralization of input during web page generation ('cross-site scripting') in pycares. Remediation is available by upgrading affected packages to version 4.2.0.
GHSA-c58j-88f5-h53f at a Glance
Security Impact
CVSS: 5.6
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L).
How to Fix GHSA-c58j-88f5-h53f
To remediate this vulnerability, upgrade all affected Pycares 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 pycares>=4.2.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show pycares
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-c58j-88f5-h53f, inspect your installed packages using pip:
pip show pycares
Analyze the terminal output to locate any version of Pycares in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.2.0), your application is affected.
Note: The pip show pycares command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where the product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users. In Pycares, 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-c58j-88f5-h53f Affected Pycares Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
pycares
|
PyPI |
< 4.2.0
|
4.2.0
|
References
Frequently Asked Questions
What is GHSA-c58j-88f5-h53f?
Which Pycares versions are affected?
What version fixes GHSA-c58j-88f5-h53f?
Is pycares affected?
What is the CVSS score of GHSA-c58j-88f5-h53f?
What CWE is associated with GHSA-c58j-88f5-h53f?
How can I check PyPI dependencies for GHSA-c58j-88f5-h53f?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-c58j-88f5-h53f",
"modified" : "2022-07-05T22:08:20Z",
"published" : "2022-07-05T22:08:20Z",
"aliases" : [ ],
"summary" : "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in pycares",
"details" : "### Impact\n\npycares versions < 4.2.0 are affected by [CVE-2021-3672](https://nvd.nist.gov/vuln/detail/CVE-2021-3672).\n\n### Patches\n\nUpdate to version 4.2.0.\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:L/A:L"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "pycares"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.2.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/saghul/pycares/security/advisories/GHSA-c58j-88f5-h53f"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/saghul/pycares"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-79" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2022-07-05T22:08:20Z",
"nvd_published_at" : null
}
}