CVE-2024-34712: Oceanic allows unsanitized user input to lead to path traversal in URLs
6.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.46183%
CWE
Published
5/14/2024
Updated
5/14/2024
KEV Status
No
Technology
JavaScript
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| oceanic.js | npm | < 1.10.4 | 1.10.4 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from route generation functions that directly interpolated user input into URL paths without URI encoding. The commit diff shows these functions were modified to use a new encode() wrapper that applies encodeURIComponent. The example in the advisory (Client.rest.channels.removeBan) maps to the GUILD_BAN route, while other modified routes like CHANNEL and GUILD_MEMBER share the same vulnerable pattern. All affected functions in Routes.ts that were patched to use encode() were previously vulnerable to path traversal via unencoded parameters.