CVE-2024-34712

6.5 MEDIUM

📋 TL;DR

CVE-2024-34712 is a path traversal vulnerability in the Oceanic Discord library for NodeJS. Attackers can manipulate input to functions like removeBan to perform unauthorized actions such as deleting Discord channels instead of removing bans. This affects applications using Oceanic versions before 1.10.4 that handle user-controlled input for Discord API operations.

💻 Affected Systems

Products:
  • Oceanic Discord library
Versions: All versions prior to 1.10.4
Operating Systems: Any OS running NodeJS
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects applications that pass user-controlled input to vulnerable Oceanic functions like Client.rest.channels.removeBan.

⚠️ Manual Verification Required

This CVE does not have specific version information in our database, so automatic vulnerability detection cannot determine if your system is affected.

Why? The CVE database entry doesn't specify which versions are vulnerable (no version ranges provided by the vendor/NVD).

🔒 Custom verification scripts are available for registered users. Sign up free to download automated test scripts.

Recommended Actions:
  1. Review the CVE details at NVD
  2. Check vendor security advisories for your specific version
  3. Test if the vulnerability is exploitable in your environment
  4. Consider updating to the latest version as a precaution

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could delete Discord channels, manage server settings, or perform other unauthorized Discord API operations depending on the vulnerable function being called.

🟠

Likely Case

Malicious users could delete channels or perform other unauthorized Discord operations by crafting specific input to vulnerable Oceanic functions.

🟢

If Mitigated

With proper input validation and encoding, the vulnerability cannot be exploited and normal Discord operations proceed securely.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires knowledge of vulnerable functions and ability to craft path traversal payloads. No public exploit code has been released.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.10.4

Vendor Advisory: https://github.com/OceanicJS/Oceanic/security/advisories/GHSA-5h5v-hw44-f6gg

Restart Required: Yes

Instructions:

1. Update Oceanic package to version 1.10.4 or later using npm update oceanic. 2. Restart your NodeJS application. 3. Verify the update was successful.

🔧 Temporary Workarounds

Input sanitization

all

Manually sanitize all user input before passing to Oceanic functions to ensure strings are valid for their intended purpose.

URI encoding

all

Encode user input with encodeURIComponent() before providing it to vulnerable Oceanic functions.

const safeInput = encodeURIComponent(userInput);

🧯 If You Can't Patch

  • Implement strict input validation for all user-controlled data passed to Oceanic functions
  • Apply network segmentation to limit the impact scope if exploitation occurs

🔍 How to Verify

Check if Vulnerable:

Check package.json or run 'npm list oceanic' to see if version is below 1.10.4

Check Version:

npm list oceanic | grep oceanic

Verify Fix Applied:

Verify oceanic version is 1.10.4 or higher using 'npm list oceanic'

📡 Detection & Monitoring

Log Indicators:

  • Unexpected Discord API calls from your application
  • Channel deletion events that don't match normal operations

Network Indicators:

  • Unusual patterns of Discord API requests containing path traversal sequences

SIEM Query:

source="discord-api" AND (uri="*../*" OR action="channel_delete")

🔗 References

📤 Share & Export