CVE-2026-27192: CWE-346: Origin Validation Error in feathersjs feathers
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.
AI Analysis
Technical Summary
Feathersjs is a popular JavaScript/TypeScript framework for building web APIs and real-time applications. In versions prior to 5.0.40, the framework's origin validation mechanism is flawed due to the use of the startsWith() string method to verify the Referer header against a list of allowed origins. This approach only checks if the Referer begins with an allowed origin string, which can be circumvented by an attacker registering a malicious domain that prefixes the allowed origin (e.g., https://target.com.attacker.com). The vulnerable function getAllowedOrigin() thus incorrectly validates such malicious origins as legitimate. While tokens are redirected to configured origins, the attacker can initiate an OAuth flow from the unauthorized origin, intercept tokens, and perform account takeover attacks. This vulnerability is classified under CWE-346 (Origin Validation Error) and has a CVSS 4.0 base score of 7.6 (high severity), reflecting its network attack vector, high impact on confidentiality and integrity, no privileges required, but requiring user interaction and high attack complexity. No known exploits are currently reported in the wild. The issue was addressed in Feathersjs version 5.0.40 by improving the origin validation logic to prevent prefix-based bypasses.
Potential Impact
The vulnerability enables attackers to bypass origin validation checks and initiate OAuth flows from unauthorized origins, potentially leading to token exfiltration and full account takeover. This compromises user confidentiality and integrity, allowing unauthorized access to sensitive data and services. Organizations relying on Feathersjs for web APIs or real-time applications that implement OAuth authentication are at risk of unauthorized access, data breaches, and account compromise. The attack requires user interaction but no authentication or privileges, increasing the attack surface. Exploitation could lead to significant reputational damage, regulatory penalties, and operational disruption, especially for services handling sensitive user data or critical business functions.
Mitigation Recommendations
1. Upgrade all Feathersjs instances to version 5.0.40 or later, where the origin validation flaw is fixed. 2. Review and tighten OAuth origin configurations to explicitly whitelist exact origins rather than relying on prefix matching. 3. Implement additional server-side validation of the Referer and Origin headers using exact string matches or robust parsing methods rather than startsWith(). 4. Employ Content Security Policy (CSP) headers to restrict allowed sources for scripts and frames. 5. Monitor OAuth flows for unusual origin patterns or token requests from unexpected domains. 6. Educate users to be cautious of phishing attempts that may exploit this vulnerability. 7. Conduct security testing and code reviews focusing on origin validation logic in custom authentication flows.
Affected Countries
United States, Germany, United Kingdom, Canada, Australia, France, Netherlands, India, Japan, South Korea
CVE-2026-27192: CWE-346: Origin Validation Error in feathersjs feathers
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.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Feathersjs is a popular JavaScript/TypeScript framework for building web APIs and real-time applications. In versions prior to 5.0.40, the framework's origin validation mechanism is flawed due to the use of the startsWith() string method to verify the Referer header against a list of allowed origins. This approach only checks if the Referer begins with an allowed origin string, which can be circumvented by an attacker registering a malicious domain that prefixes the allowed origin (e.g., https://target.com.attacker.com). The vulnerable function getAllowedOrigin() thus incorrectly validates such malicious origins as legitimate. While tokens are redirected to configured origins, the attacker can initiate an OAuth flow from the unauthorized origin, intercept tokens, and perform account takeover attacks. This vulnerability is classified under CWE-346 (Origin Validation Error) and has a CVSS 4.0 base score of 7.6 (high severity), reflecting its network attack vector, high impact on confidentiality and integrity, no privileges required, but requiring user interaction and high attack complexity. No known exploits are currently reported in the wild. The issue was addressed in Feathersjs version 5.0.40 by improving the origin validation logic to prevent prefix-based bypasses.
Potential Impact
The vulnerability enables attackers to bypass origin validation checks and initiate OAuth flows from unauthorized origins, potentially leading to token exfiltration and full account takeover. This compromises user confidentiality and integrity, allowing unauthorized access to sensitive data and services. Organizations relying on Feathersjs for web APIs or real-time applications that implement OAuth authentication are at risk of unauthorized access, data breaches, and account compromise. The attack requires user interaction but no authentication or privileges, increasing the attack surface. Exploitation could lead to significant reputational damage, regulatory penalties, and operational disruption, especially for services handling sensitive user data or critical business functions.
Mitigation Recommendations
1. Upgrade all Feathersjs instances to version 5.0.40 or later, where the origin validation flaw is fixed. 2. Review and tighten OAuth origin configurations to explicitly whitelist exact origins rather than relying on prefix matching. 3. Implement additional server-side validation of the Referer and Origin headers using exact string matches or robust parsing methods rather than startsWith(). 4. Employ Content Security Policy (CSP) headers to restrict allowed sources for scripts and frames. 5. Monitor OAuth flows for unusual origin patterns or token requests from unexpected domains. 6. Educate users to be cautious of phishing attempts that may exploit this vulnerability. 7. Conduct security testing and code reviews focusing on origin validation logic in custom authentication flows.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-02-18T19:47:02.154Z
- Cvss Version
- 4.0
- State
- PUBLISHED
Threat ID: 69992e44be58cf853b3dccd0
Added to database: 2/21/2026, 4:02:12 AM
Last enriched: 2/28/2026, 1:24:33 PM
Last updated: 4/7/2026, 11:40:02 AM
Views: 315
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.