Advisory

GO-2022-0619

Also known as: CVE-2022-1996, GHSA-r48q-9g5r-8q2h

Summary

Authorization bypass in github.com/emicklei/go-restful, go-restful/v2 and go-restful/v3

Details

CORS filters that use an AllowedDomains configuration parameter can match domains outside the specified set, permitting an attacker to avoid the CORS policy.

The AllowedDomains configuration parameter is documented as a list of allowed origin domains, but values in this list are applied as regular expression matches. For example, an allowed domain of "example.com" will match the Origin header "example.com.malicious.domain".

Severity

Not rated by the source.

Dates

Published
2022-08-15 18:05 UTC
Modified
2026-02-04 02:45 UTC

Affected packages and fixes

github.com/emicklei/go-restful

Go · All systems

Affected

  • introduced 0, fixed 2.16.0+incompatible (semver)

Fixed versions

2.16.0+incompatible

Fix

  • Fixed version 2.16.0+incompatible
    go get github.com/emicklei/[email protected]+incompatible

github.com/emicklei/go-restful/v2

Go · All systems

Affected

  • introduced 2.7.1 (semver)

Fixed versions

None listed

Fix

No fixed version is listed.

github.com/emicklei/go-restful/v3

Go · All systems

Affected

  • introduced 3.0.0, fixed 3.8.0 (semver)

Fixed versions

3.8.0

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