CVE-2023-37899

7.5 HIGH

📋 TL;DR

Feathers.js Socket.io handler contains an uncaught exception vulnerability where specially crafted messages with invalid toString methods can crash the Node.js process. This affects all Feathers.js applications using Socket.io for real-time communication. The vulnerability allows denial of service attacks against affected applications.

💻 Affected Systems

Products:
  • Feathers.js
Versions: All versions before 4.5.18 and 5.0.8
Operating Systems: All platforms running Node.js
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications using Feathers.js with Socket.io transport. Applications using only REST are not affected.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete service disruption through repeated process crashes, potentially leading to extended downtime and service unavailability.

🟠

Likely Case

Intermittent service disruptions and degraded performance as Node.js processes restart after crashes.

🟢

If Mitigated

Minimal impact with proper monitoring and auto-restart mechanisms in place, though service interruptions may still occur.

🌐 Internet-Facing: HIGH - Socket.io endpoints are typically exposed to clients, making them directly accessible to attackers.
🏢 Internal Only: MEDIUM - Internal clients could still exploit this, but attack surface is more limited.

🎯 Exploit Status

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

Exploit requires sending specially crafted Socket.io messages. The advisory includes example payloads that demonstrate the vulnerability.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 4.5.18 or 5.0.8

Vendor Advisory: https://github.com/feathersjs/feathers/security/advisories/GHSA-hhr9-rh25-hvf9

Restart Required: Yes

Instructions:

1. Update package.json to specify Feathers.js version 4.5.18+ (for v4) or 5.0.8+ (for v5). 2. Run 'npm update @feathersjs/feathers' or 'yarn upgrade @feathersjs/feathers'. 3. Restart all Node.js processes running the application.

🔧 Temporary Workarounds

No official workaround

all

The advisory states there is no known workaround for this vulnerability.

🧯 If You Can't Patch

  • Implement rate limiting on Socket.io endpoints to reduce impact of repeated attacks
  • Deploy application behind a WAF with DoS protection capabilities

🔍 How to Verify

Check if Vulnerable:

Check package.json for @feathersjs/feathers version. If version is below 4.5.18 (for v4) or below 5.0.8 (for v5), the system is vulnerable.

Check Version:

npm list @feathersjs/feathers | grep @feathersjs/feathers

Verify Fix Applied:

After updating, verify the version is 4.5.18+ or 5.0.8+ and test Socket.io message handling with various payloads.

📡 Detection & Monitoring

Log Indicators:

  • Node.js process crashes
  • Uncaught exceptions in application logs
  • Socket.io connection errors
  • Process restart events

Network Indicators:

  • Unusual Socket.io message patterns
  • High volume of Socket.io messages from single sources

SIEM Query:

source="application.logs" AND ("uncaught exception" OR "process.exit" OR "socket.emit") AND ("toString" OR "Feathers" OR "Socket.io")

🔗 References

📤 Share & Export