# CVE-2025-50864: elysia-cors Origin Validation Error

- Severity: Medium 6.5 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.56%, higher than 48% of CVEs (2026-12-01)
- Published: 2025-08-20T00:00:00.000Z
- Modified: 2026-07-05T02:16:51.173Z
- Also known as: GHSA-f9qj-4c5x-cpcw
- Weaknesses: CWE-178, CWE-346
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: mitre

## Description

An Origin Validation Error in the elysia-cors library thru 1.3.0 allows attackers to bypass Cross-Origin Resource Sharing (CORS) restrictions. The library incorrectly validates the supplied origin by checking if it is a substring of any domain in the site's CORS policy, rather than performing an exact match. For example, a malicious origin like "notexample.com", "example.common.net" is whitelisted when the site's CORS policy specifies "example.com." This vulnerability enables unauthorized access to user data on sites using the elysia-cors library for CORS validation.

(As written by CVE List.)

## Affected

- Unspecified product: n/a
- @elysiajs/cors (npm): before 1.3.1

## Every score

- CISA-ADP: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N`
- GitHub: CVSS:3.1 6.5 Medium `CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:N/I:H/A:N`
- GitHub: CVSS:4.0 Medium `CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:N/SC:N/SI:N/SA:N`

## References

- <https://github.com/elysiajs/elysia-cors/blob/main/src/index.ts> (web)
- <https://github.com/elysiajs/elysia-cors/tree/main> (web)
- <https://medium.com/@raghavagrawal_23036/cors-bypass-in-popular-opensource-library-ad27fb41e16a> (web)
- <https://github.com/elysiajs/elysia-cors/commit/9b9eb92e32a7a4b43b6d5108668941701c33e221> (web)
- <https://nvd.nist.gov/vuln/detail/CVE-2025-50864> (advisory)
- <https://github.com/elysiajs/elysia-cors> (package)
- <http://elysiajs.com> (web)

## Sources

- CVE List: [CVE-2025-50864](https://www.cve.org/CVERecord?id=CVE-2025-50864), CVE Terms of Use, modified 2026-07-05
- GitHub Advisory Database: [GHSA-f9qj-4c5x-cpcw](https://github.com/advisories/GHSA-f9qj-4c5x-cpcw), CC-BY-4.0, modified 2026-02-03
- NVD: [CVE-2025-50864](https://nvd.nist.gov/vuln/detail/CVE-2025-50864), Public domain, modified 2026-07-05

---

Page: https://cve.day/CVE-2025-50864 · Whole record: https://cve.day/CVE-2025-50864.json · Rebuilt by cve.day 2026-11-25T22:59:03.415Z
