GHSA-vhxv-fg4m-p2w8 json
Some CORS middleware allow untrusted origins
published 2y ago modified 9mo ago also GO-2024-2813
- cvss
- 9.3
- version 3.1, GitHub
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
### Impact
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`.
### Patches
Patched in v0.1.3.
### Workarounds
None.
Patch / fix
- go github.com/jub0bs/cors 0.1.3
- github.com/jub0bs/cors@5bc0648 commit
- github.com/jub0bs/cors@63900fa commit
Is GHSA-vhxv-fg4m-p2w8 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| GitHub | 3.1 | 9.3 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/jub0bs/cors | <0.1.3 |
0.1.3 |
References
Sources
- GitHub Advisory GHSA-vhxv-fg4m-p2w8
- OSV GO-2024-2813
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.