CVE-2023-41049
📋 TL;DR
This CVE describes a cross-site scripting (XSS) vulnerability in the @dcl/single-sign-on-client npm library. Improper input validation in the init function allows attackers to execute arbitrary JavaScript using the javascript: prefix. This affects applications using vulnerable versions of this authentication library.
💻 Affected Systems
- @dcl/single-sign-on-client
📦 What is this software?
Single Sign On Client by Decentraland
⚠️ Risk & Real-World Impact
Worst Case
Complete compromise of user sessions, credential theft, and unauthorized access to protected resources through client-side JavaScript execution.
Likely Case
Session hijacking, credential theft, and unauthorized actions performed on behalf of authenticated users.
If Mitigated
Limited impact with proper input validation and output encoding in place, potentially preventing successful exploitation.
🎯 Exploit Status
XSS vulnerabilities are commonly exploited and require minimal technical skill when weaponized.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 0.1.0
Vendor Advisory: https://github.com/decentraland/single-sign-on-client/security/advisories/GHSA-vp4f-wxgw-7x8x
Restart Required: Yes
Instructions:
1. Update package.json to specify @dcl/single-sign-on-client version 0.1.0 or higher. 2. Run npm update @dcl/single-sign-on-client. 3. Restart your application to load the patched version.
🔧 Temporary Workarounds
Input Validation Workaround
allImplement strict input validation to reject any input containing javascript: prefixes before passing to the init function.
🧯 If You Can't Patch
- Implement strict input validation and sanitization for all user inputs passed to the init function.
- Implement Content Security Policy (CSP) headers to restrict script execution sources.
🔍 How to Verify
Check if Vulnerable:
Check package.json or run npm list @dcl/single-sign-on-client to see if version is below 0.1.0.
Check Version:
npm list @dcl/single-sign-on-client
Verify Fix Applied:
Confirm package.json specifies version 0.1.0 or higher and npm list shows the updated version.
📡 Detection & Monitoring
Log Indicators:
- Unusual authentication attempts
- JavaScript errors related to the init function
- Unexpected redirects to javascript: URLs
Network Indicators:
- Requests containing javascript: in parameters
- Unexpected redirects in authentication flows
SIEM Query:
search 'javascript:' in web request parameters OR search for authentication failures from @dcl/single-sign-on-client
🔗 References
- https://github.com/decentraland/single-sign-on-client/commit/bd20ea9533d0cda30809d929db85b1b76cef855a
- https://github.com/decentraland/single-sign-on-client/security/advisories/GHSA-vp4f-wxgw-7x8x
- https://github.com/decentraland/single-sign-on-client/commit/bd20ea9533d0cda30809d929db85b1b76cef855a
- https://github.com/decentraland/single-sign-on-client/security/advisories/GHSA-vp4f-wxgw-7x8x