# GHSA-c58j-88f5-h53f: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in pycares

> Cross-site scripting vulnerability in pycares allows attackers to inject malicious scripts into web pages viewed by other users.

- **Severity:** Not scored
- **Exploited in the wild:** Not known
- **Login needed:** Not stated
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 5 Jul 2022

## What is GHSA-c58j-88f5-h53f?

GHSA-c58j-88f5-h53f is a cross-site scripting vulnerability in pycares, published on 5 Jul 2022. It can be exploited over the network, and only if a user opens a file or follows a link.

### Official description

### Impact

pycares versions < 4.2.0 are affected by [CVE-2021-3672](https://nvd.nist.gov/vuln/detail/CVE-2021-3672).

### Patches

Update to version 4.2.0.

## Which versions are affected by GHSA-c58j-88f5-h53f?

2 open source packages ship an affected version, including pycares.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `pycares` | PyPI | All versions | 4.2.0 |
| `pycares` | PyPI | All versions | 4.2.0 |

## How do I fix GHSA-c58j-88f5-h53f?

Upgrade pycares to 4.2.0 or later.

## Is GHSA-c58j-88f5-h53f being exploited?

There is no known exploitation of GHSA-c58j-88f5-h53f in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for GHSA-c58j-88f5-h53f and fix it if it is affected.

What it is: GHSA-c58j-88f5-h53f is a cross-site scripting vulnerability in pycares, published on 5 Jul 2022. It can be exploited over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of GHSA-c58j-88f5-h53f in the wild and no public exploit code.

Affected packages and fixed versions:
- pycares (PyPI): affected all versions; fixed in 4.2.0
- pycares (PyPI): affected all versions; fixed in 4.2.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/GHSA-c58j-88f5-h53f/ (Markdown: https://insights.sbomify.com/GHSA-c58j-88f5-h53f/index.md)
```

## Sources

- OSV: https://osv.dev/vulnerability/GHSA-c58j-88f5-h53f

---
From sbomify Insights: https://insights.sbomify.com/GHSA-c58j-88f5-h53f/
Summaries are generated and may contain mistakes; the official description above is the record.
