Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS01aDV2LWh3NDQtZjZnZ84AA8EM
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
Permalink: https://github.com/advisories/GHSA-5h5v-hw44-f6ggJSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS01aDV2LWh3NDQtZjZnZ84AA8EM
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: 7 months ago
Updated: 7 months ago
CVSS Score: 6.5
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N
Identifiers: GHSA-5h5v-hw44-f6gg, CVE-2024-34712
References:
- https://github.com/OceanicJS/Oceanic/security/advisories/GHSA-5h5v-hw44-f6gg
- https://nvd.nist.gov/vuln/detail/CVE-2024-34712
- https://github.com/OceanicJS/Oceanic/commit/8bf8ee8373b8c565fbdbf70a609aba4fbc1a1ffe
- https://github.com/advisories/GHSA-5h5v-hw44-f6gg
Blast Radius: 7.6
Affected Packages
npm:oceanic.js
Dependent packages: 25Dependent repositories: 15
Downloads: 2,913 last month
Affected Version Ranges: < 1.10.4
Fixed in: 1.10.4
All affected versions: 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.0.5, 0.0.6, 0.0.7, 0.0.8, 0.0.9, 0.0.10, 0.0.11, 1.0.0, 1.0.2, 1.1.0, 1.1.1, 1.1.2, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.3.2, 1.4.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.8.1, 1.9.0, 1.10.0, 1.10.1, 1.10.2, 1.10.3
All unaffected versions: 1.10.4, 1.11.0, 1.11.1, 1.11.2