CVE-2026-27192
Received Received - Intake
Origin Validation Bypass in Feathersjs Enables OAuth Token Theft

Publication date: 2026-02-21

Last updated on: 2026-02-25

Assigner: GitHub, Inc.

Description
Feathersjs is a framework for creating web APIs and real-time applications with TypeScript or JavaScript. In versions 5.0.39 and below, origin validation uses startsWith() for comparison, allowing attackers to bypass the check by registering a domain that shares a common prefix with an allowed origin.The getAllowedOrigin() function checks if the Referer header starts with any allowed origin, and this comparison is insufficient as it only validates the prefix. This is exploitable when the origins array is configured and an attacker registers a domain starting with an allowed origin string (e.g., https://target.com.attacker.com bypasses https://target.com). On its own, tokens are still redirected to a configured origin. However, in specific scenarios an attacker can initiate the OAuth flow from an unauthorized origin and exfiltrate tokens, achieving full account takeover. This issue has bee fixed in version 5.0.40.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-02-21
Last Modified
2026-02-25
Generated
2026-05-07
AI Q&A
2026-02-21
EPSS Evaluated
2026-05-05
NVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
feathersjs feathers to 5.0.40 (exc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-346 The product does not properly verify that the source of data or communication is valid.
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?

[{'type': 'paragraph', 'content': 'CVE-2026-27192 is a vulnerability in the Feathersjs framework, specifically in the @feathersjs/authentication-oauth package versions up to 5.0.39. The issue arises because the origin validation uses the JavaScript startsWith() method to check if the Referer header matches any allowed origin. This method only checks the prefix, which is insufficient.'}, {'type': 'paragraph', 'content': 'An attacker can exploit this by registering a malicious domain that shares a prefix with a legitimate allowed origin (for example, "https://target.com.attacker.com" bypasses the check for "https://target.com"). This allows the attacker to initiate an OAuth flow from an unauthorized origin.'}, {'type': 'paragraph', 'content': 'In certain scenarios, this flaw can lead to exfiltration of tokens and result in full account takeover. The vulnerability corresponds to CWE-346 (Origin Validation Error) and was fixed in version 5.0.40.'}] [1]


How can this vulnerability impact me? :

This vulnerability can allow an attacker to bypass origin checks and initiate OAuth flows from unauthorized domains that appear to be legitimate due to prefix matching.

As a result, attackers may exfiltrate authentication tokens and potentially achieve full account takeover, compromising user accounts and sensitive data.


How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

I don't know


How can this vulnerability be detected on my network or system? Can you suggest some commands?

[{'type': 'paragraph', 'content': 'This vulnerability arises from improper origin validation in the getAllowedOrigin() function, which uses the JavaScript startsWith() method to compare the Referer header against allowed origins. Detection involves monitoring HTTP requests for Referer headers that start with allowed origins but actually come from unauthorized domains that share the prefix.'}, {'type': 'paragraph', 'content': 'To detect exploitation attempts on your system or network, you can analyze web server logs or proxy logs for Referer headers that appear to bypass origin checks by using domains that share prefixes with allowed origins but are not legitimate.'}, {'type': 'list_item', 'content': "Use grep or similar tools to search logs for suspicious Referer headers, for example: `grep -i 'Referer: https://target.com' access.log` and then verify if the domain is exactly the allowed origin or a malicious prefix-sharing domain like `https://target.com.attacker.com`."}, {'type': 'list_item', 'content': 'Use network monitoring tools to capture HTTP traffic and filter for Referer headers starting with allowed origins but originating from unexpected domains.'}, {'type': 'list_item', 'content': 'If you have access to the application code or runtime environment, review the version of @feathersjs/authentication-oauth to ensure it is above 5.0.39, as vulnerable versions use the flawed startsWith() origin validation.'}] [1]


What immediate steps should I take to mitigate this vulnerability?

The primary mitigation step is to upgrade the @feathersjs/authentication-oauth package to version 5.0.40 or later, where the origin validation flaw has been fixed.

Until the upgrade can be applied, consider implementing stricter origin validation by replacing prefix-based checks with exact matches or more robust validation logic to prevent attackers from bypassing origin checks using domains that share prefixes.

Monitor OAuth flows and token redirections carefully for any suspicious activity that might indicate exploitation attempts.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart