{"id":"CVE-2024-34712","published":"2024-05-14T14:32:06Z","modified":"2024-08-02T02:59:22Z","title":"Oceanic allows unsanitized user input to lead to path traversal in URLs","vendor":"OceanicJS","product":"Oceanic","tier":"tail","description":{"text":"Oceanic is a NodeJS library for interfacing with Discord. Prior to version 1.10.4, input to functions such as `Client.rest.channels.removeBan` is not url-encoded, resulting in specially crafted input such as `../../../channels/{id}` being normalized into the url `/api/v10/channels/{id}`, and deleting a channel rather than removing a ban. Version 1.10.4 fixes this issue. Some workarounds are available. One may sanitize user input, ensuring strings are valid for the purpose they are being used for. One may also encode input with `encodeURIComponent` before providing it to the library.","provenance":"source","from":"CVE.org"},"cvss":{"score":6.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00556,"percentile":0.47277,"provenance":"source"},"cwes":[{"id":"CWE-23","name":"Relative Path Traversal"},{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"references":[{"url":"https://github.com/OceanicJS/Oceanic/security/advisories/GHSA-5h5v-hw44-f6gg","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/OceanicJS/Oceanic/commit/8bf8ee8373b8c565fbdbf70a609aba4fbc1a1ffe","tags":["x_refsource_MISC"]}],"priority":{"score":14.0,"factors":[{"name":"EPSS percentile","points":9.46},{"name":"CVSS severity","points":4.55}]},"vendorSlug":"oceanicjs","affectedVersions":[{"vendor":"OceanicJS","product":"Oceanic","versions":["< 1.10.4"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"partial","timestamp":"2024-05-16T16:13:51.308904Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"oceanic.js","vulnerableRanges":["<1.10.4"],"patched":["1.10.4"],"from":["GHSA-5h5v-hw44-f6gg"],"provenance":"source"}],"summary":{"text":"The flaw is in Oceanic, a NodeJS library for interfacing with Discord, where user input passed to functions such as Client.rest.channels.removeBan is not URL-encoded, allowing path traversal sequences to alter the request target. An attacker with low-privilege authentication and network access to the application that uses the library can supply crafted input, such as a traversal string containing a channel identifier, so that the request is normalized to a different endpoint and deletes a channel instead of removing a ban.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:39:37Z"},"euvd":{"id":"EUVD-2024-1440","exploited":false,"provenance":"source"}}