CVE-2023-41049

7.5 HIGH

📋 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

Products:
  • @dcl/single-sign-on-client
Versions: All versions before 0.1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Any application using the vulnerable init function with untrusted input is affected.

📦 What is this software?

⚠️ 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.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

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

all

Implement 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

📤 Share & Export