CVE-2024-45258
req may send an unintended request when a malformed URL is provided
Auswirkung
The `req` library is a widely used HTTP library in Go. However, it does not handle malformed URLs effectively. As a result, after parsing a malformed URL, the library may send HTTP requests to unexpected destinations, potentially leading to security vulnerabilities or unintended behavior in applications relying on this library for handling HTTP requests. Despite developers potentially utilizing the `net/url` library to parse malformed URLs and implement blocklists to prevent HTTP requests to listed URLs, inconsistencies exist between how the `net/url` and `req` libraries parse URLs. These discrepancies can lead to the failure of defensive strategies, resulting in potential security threats such as Server-Side Request Forgery (SSRF) and Remote Code Execution (RCE).
Ein Angreifer kann die Lücke über das Netzwerk ausnutzen, ohne Anmeldung, ohne Zutun eines Nutzers. Bei Erfolg: hohes Risiko, dass Daten ausgelesen werden, hohes Risiko, dass Daten oder Systeme verändert werden, hohes Risiko für Ausfälle.
Betroffene Pakete
| Ökosystem | Paket | Betroffen | Behoben in |
|---|---|---|---|
| go | github.com/imroc/req/v3 | < 3.43.4 | 3.43.4 |
| go | github.com/imroc/req | < 3.43.4 | 3.43.4 |
| go | github.com/imroc/req/v2 | < 3.43.4 | 3.43.4 |
Betroffene Produkte
| Produkt | Betroffene Versionen |
|---|---|
| req package | vor 3.43.4 |
Die Versionen stammen aus dem Text des Advisorys. Strukturierte Produktdaten wurden für diesen Eintrag noch nicht veröffentlicht.
Schwachstellenklasse
Referenzen
- NVD-Eintrag
- CVE.org-Eintrag
- GitHub-Advisory
- https://github.com/imroc/req/commit/04e3ece5b380ecad9da3551c449f1b8a9aa76d3d
- https://github.com/imroc/req/compare/v3.43.3...v3.43.4
- https://github.com/advisories/GHSA-cj55-gc7m-wvcq
- https://nvd.nist.gov/vuln/detail/CVE-2024-45258
- https://pkg.go.dev/vuln/GO-2024-3098