GO-2024-2813

Source
https://pkg.go.dev/vuln/GO-2024-2813
Import Source
https://vuln.go.dev/ID/GO-2024-2813.json
JSON Data
https://api.osv.dev/v1/vulns/GO-2024-2813
Aliases
Related
Published
2024-05-21T15:08:01Z
Modified
2024-05-21T15:26:47.768542Z
Summary
Some CORS middleware allow untrusted origins in github.com/jub0bs/cors
Details

Some CORS middleware (more specifically those created by specifying two or more origin patterns whose hosts share a proper suffix) incorrectly allow some untrusted origins, thereby opening the door to cross-origin attacks from the untrusted origins in question.

For example, specifying origin patterns "https://foo.com" and "https://bar.com" (in that order) would yield a middleware that would incorrectly allow untrusted origin "https://barfoo.com".

Database specific
{
    "review_status": "REVIEWED",
    "url": "https://pkg.go.dev/vuln/GO-2024-2813"
}
References

Affected packages

Go / github.com/jub0bs/cors

Package

Name
github.com/jub0bs/cors
View open source insights on deps.dev
Purl
pkg:golang/github.com/jub0bs/cors

Affected ranges

Type
SEMVER
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
0.1.3

Ecosystem specific

{
    "imports": [
        {
            "path": "github.com/jub0bs/cors/internal/origins/radix",
            "symbols": [
                "Tree.Contains",
                "Tree.Insert"
            ]
        }
    ]
}