logo

CVE-2024-34712 oceanic.js

Package

Manager: npm
Name: oceanic.js
Vulnerable Version: >=0 <1.10.4

Severity

Level: Medium

CVSS v3.1: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N

CVSS v4.0: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N

EPSS: 0.00233 pctl0.46086

Details

Oceanic allows unsanitized user input to lead to path traversal in URLs ### Impact 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. ### Workarounds * Sanitizing user input, ensuring strings are valid for the purpose they are being used for. * Encoding input with `encodeURIComponent` before providing it to the library. ### References OceanicJS/Oceanic@8bf8ee8373b8c565fbdbf70a609aba4fbc1a1ffe

Metadata

Created: 2024-05-14T20:13:58Z
Modified: 2024-05-14T20:13:58Z
Source: https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/05/GHSA-5h5v-hw44-f6gg/GHSA-5h5v-hw44-f6gg.json
CWE IDs: ["CWE-22", "CWE-23"]
Alternative ID: GHSA-5h5v-hw44-f6gg
Finding: F063
Auto approve: 1