# GHSA-v84h-653v-4pq9: Some CORS middleware allow untrusted origins

- Severity: Critical 9.3 (CVSS:3.1, scored by GitHub) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Published: 2024-05-03T17:34:21.000Z
- Modified: 2026-02-04T04:32:51.776Z
- Also known as: GO-2024-2812
- Related: GO-2024-2813, GHSA-vhxv-fg4m-p2w8

## Description

### 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.9.0.

### Workarounds

None.

(As written by GitHub Advisory Database.)

## Affected

- github.com/jub0bs/fcors (Go): before 0.9.0

## References

- <https://github.com/jub0bs/fcors/security/advisories/GHSA-v84h-653v-4pq9> (advisory, web)
- <https://github.com/jub0bs/fcors/commit/08d85c149a418a583315cee066d4a35cc817219d> (web)
- <https://github.com/jub0bs/fcors/commit/b5dcb889a49def37d7d9c25deb7135f4eb45625e> (fix, web)
- <https://github.com/jub0bs/fcors> (package)

## Sources

- GitHub Advisory Database: [GHSA-v84h-653v-4pq9](https://github.com/advisories/GHSA-v84h-653v-4pq9), CC-BY-4.0, modified 2026-02-04
- Go Vulnerability Database: [GO-2024-2812](https://pkg.go.dev/vuln/GO-2024-2812), CC-BY-4.0, modified 2026-02-04

---

Page: https://cve.day/GHSA-v84h-653v-4pq9 · Whole record: https://cve.day/GHSA-v84h-653v-4pq9.json · Rebuilt by cve.day 2026-11-25T22:56:23.730Z
