Quick answers
- Is CVE-2025-50864 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2025-50864 being exploited in the wild.
- How severe is CVE-2025-50864?
- Medium severity, with a CVSS score of 6.5, published 20 August 2025.
- Which products and versions are affected?
- ElysiaJS Elysia-Cors thru 1.3.0; @elysiajs/cors (npm) SEMVER:introduced=0,fixed=1.3.1.
- Is there a fix for CVE-2025-50864?
- Yes. @elysiajs/cors (npm): upgrade to 1.3.1 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2025-50864 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2025-50864?
- Check whether you run ElysiaJS Elysia-Cors or @elysiajs/cors (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- @elysiajs/cors (npm): upgrade to 1.3.1 or later
npm install @elysiajs/cors@1.3.1
Technical details
The elysia-cors library (versions up to 1.3.0) incorrectly validates the 'Origin' header by performing a substring match instead of an exact match against the configured whitelist. An attacker can bypass CORS policies by hosting a malicious site on a domain that contains the legitimate domain as a substring (e.g., 'victim.com.malicious.com' bypassing a 'victim.com' policy). This vulnerability is classified as CWE-178 (Improper Handling of Case Sensitivity/Origin Validation Error). A fix was introduced in version 1.3.1 which implements strict origin checking.
Affected products
- elysiajs elysia-cors thru 1.3.0
Identifiers
- CVE-2025-50864
- GHSA-f9qj-4c5x-cpcw
Timeline
- 2025-05-08: patched: Fixed in version 1.3.1 via commit 9b9eb92e32a7a4b43b6d5108668941701c33e221
- 2025-08-20: disclosed
- 2025-08-20: advisory