{"answers":{"affected":"2 open source packages ship an affected version, including oceanic.js.","exploited":"There is no known exploitation of CVE-2024-34712 in the wild and no public exploit code.","fix":"Upgrade oceanic.js to 1.10.4 or later.","what":"CVE-2024-34712 is a medium-severity path traversal vulnerability in OceanicJS Oceanic, published on 14 May 2024. Any signed-in user can exploit it over the network, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-34712 and fix it if it is affected.\n\nWhat it is: CVE-2024-34712 is a medium-severity path traversal vulnerability in OceanicJS Oceanic, published on 14 May 2024. Any signed-in user can exploit it over the network, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2024-34712 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- oceanic.js (npm): affected all versions; fixed in 1.10.4\n- oceanic.js (npm): affected all versions; fixed in 1.10.4\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-34712/ (Markdown: https://insights.sbomify.com/CVE-2024-34712/index.md)","id":"CVE-2024-34712","markdown":"https://insights.sbomify.com/CVE-2024-34712/index.md","name":"CVE-2024-34712","record":{"aliases":["GHSA-5h5v-hw44-f6gg"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_modify"],"network_reachable":"yes","non_default_config":false,"product_category":"Discord Node.js library","requires_auth":"low_privilege","summary":"Attackers can manipulate API URLs to delete Discord channels instead of removing bans due to unsanitized input in the Oceanic library.","user_interaction":"not_required","vuln_class":"path_traversal"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":6.5,"severity":"medium","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-23","name":"Relative Path Traversal"},{"id":"CWE-22","name":"Improper Limitation of a Pathname to a Restricted Directory"}],"description":"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.","ecosystems":["npm"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"Oceanic allows unsanitized user input to lead to path traversal in URLs","id":"CVE-2024-34712","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"path_traversal","year":"2024"},"n_packages":2,"n_references":2,"next":{"headline":"sshproxy vulnerable to SSH option injection","id":"CVE-2024-34713"},"packages":[{"ecosystem":"npm","fixed":["1.10.4"],"introduced":["0"],"last_affected":[],"package":"oceanic.js","purl":null,"source":"GHSA-5h5v-hw44-f6gg"},{"ecosystem":"npm","fixed":["1.10.4"],"introduced":["0"],"last_affected":[],"package":"oceanic.js","purl":"pkg:npm/oceanic.js","source":"GHSA-5h5v-hw44-f6gg"}],"prev":{"headline":"GeoServer has improper ENTITY_RESOLUTION_ALLOWLIST URI validation in XML Processing (SSRF)","id":"CVE-2024-34711"},"products":["Oceanic"],"published":"2024-05-14","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"partial"},"state":"PUBLISHED","updated":"2024-08-02","vendors":["OceanicJS"]},"summary":"Attackers can manipulate API URLs to delete Discord channels instead of removing bans due to unsanitized input in the Oceanic library.","url":"https://insights.sbomify.com/CVE-2024-34712/"}