CVE-2022-1650

8.1 HIGH

📋 TL;DR

CVE-2022-1650 is an information exposure vulnerability in the eventsource JavaScript library where sensitive information (like authentication tokens) isn't properly removed before being stored or transferred. This affects applications using eventsource prior to v2.0.2 that handle sensitive data via EventSource connections. Attackers could potentially intercept or access this exposed information.

💻 Affected Systems

Products:
  • eventsource JavaScript library
Versions: All versions prior to v2.0.2
Operating Systems: All platforms using Node.js or browser JavaScript
Default Config Vulnerable: ⚠️ Yes
Notes: Affects any application using the vulnerable eventsource library to handle sensitive data via Server-Sent Events (SSE).

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Authentication tokens, session cookies, or other sensitive credentials are exposed to unauthorized parties, leading to account takeover, data breaches, or lateral movement within systems.

🟠

Likely Case

Exposure of sensitive information in logs, error messages, or network traffic that could be harvested by attackers with access to these systems.

🟢

If Mitigated

Limited exposure of non-critical information with proper input validation and output encoding in place.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

The vulnerability is in the library's handling of sensitive data, making exploitation straightforward once an attacker identifies vulnerable implementations.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: v2.0.2

Vendor Advisory: https://github.com/eventsource/eventsource/commit/10ee0c4881a6ba2fe65ec18ed195ac35889583c4

Restart Required: No

Instructions:

1. Update package.json to specify 'eventsource': '>=2.0.2'. 2. Run 'npm update eventsource' or 'yarn upgrade eventsource'. 3. Test your application's EventSource functionality.

🔧 Temporary Workarounds

Input validation and sanitization

all

Implement strict input validation and output encoding for all data passed through EventSource connections

🧯 If You Can't Patch

  • Implement network segmentation to isolate systems using vulnerable eventsource versions
  • Deploy web application firewalls (WAF) with rules to detect sensitive data leakage patterns

🔍 How to Verify

Check if Vulnerable:

Check package.json or package-lock.json for eventsource version. If version is <2.0.2, the system is vulnerable.

Check Version:

npm list eventsource | grep eventsource

Verify Fix Applied:

Verify eventsource version is >=2.0.2 using 'npm list eventsource' or checking package.json.

📡 Detection & Monitoring

Log Indicators:

  • Unexpected sensitive data in application logs
  • Error messages containing authentication tokens or credentials

Network Indicators:

  • Sensitive data visible in plaintext in Server-Sent Events traffic
  • Unexpected data patterns in SSE connections

SIEM Query:

source="application_logs" AND ("authentication_token" OR "session_cookie" OR "password") AND "EventSource"

🔗 References

📤 Share & Export