Advisory

GO-2024-3098

Also known as: CVE-2024-45258, GHSA-cj55-gc7m-wvcq

Summary

The req library may send an unintended request when a malformed URL is provided in github.com/imroc/req

Details

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

Severity

Not rated by the source.

Dates

Published
2024-09-13 21:53 UTC
Modified
2024-09-13 22:27 UTC

Affected packages and fixes

github.com/imroc/req

Go · All systems

Affected

  • introduced 0 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

github.com/imroc/req/v2

Go · All systems

Affected

  • introduced 0 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

github.com/imroc/req/v3

Go · All systems

Affected

  • introduced 0, fixed 3.43.4 (semver)

Fixed versions

3.43.4

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: Go Vulnerability Database · CC BY 4.0

Sources & licences