CVE-2025-50864

Medium

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.

SeverityMedium
CVSS6.5
Exploit probability—
Product@elysiajs/cors
PublishedAug 20, 2025
First seenAug 20, 2025
Weakness typeCWE-178CWE-178

How to fix

Update
  • @elysiajs/cors1.3.1 or later

Affected products

ProductAffected versionsFixed in
@elysiajs/corsnpmv < 1.3.11.3.1

Check your version

Choose the product and enter the version you run to see whether it falls in the affected range.

In the Intelligence 360 plan

Attack Surface Management

See the assets tied to your domains, the technologies they run and known vulnerabilities in one list.