{"answers":{"affected":"2 open source packages ship an affected version, including discordrb. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-28102 exists.","fix":"Upgrade discordrb to 3.4.3 or later.","what":"CVE-2023-28102 is a high-severity command injection vulnerability in shardlab discordrb, published on 27 Mar 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2023-28102 and fix it if it is affected.\n\nWhat it is: CVE-2023-28102 is a high-severity command injection vulnerability in shardlab discordrb, published on 27 Mar 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2023-28102 exists.\n\nAffected packages and fixed versions:\n- discordrb (RubyGems): affected all versions; fixed in 3.4.3\n- discordrb (RubyGems): affected all versions; fixed in 3.4.3\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-2023-28102/ (Markdown: https://insights.sbomify.com/CVE-2023-28102/index.md)","id":"CVE-2023-28102","markdown":"https://insights.sbomify.com/CVE-2023-28102/index.md","name":"CVE-2023-28102","record":{"aliases":["GHSA-8832-4mm5-x2r6"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"Ruby Discord library","requires_auth":"none","summary":"Attackers can execute arbitrary shell commands if user input reaches the vulnerable encoder method in the discordrb Ruby library.","user_interaction":"required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"discordrb","vendor":"discordrb_project"}],"cvss":{"score":8.4,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"description":"discordrb is an implementation of the Discord API using Ruby. In discordrb before commit `91e13043ffa` the `encoder.rb` file unsafely constructs a shell string using the file parameter, which can potentially leave clients of discordrb vulnerable to command injection. The library is not directly exploitable: the exploit requires that some client of the library calls the vulnerable method with user input. However, if unsafe input reaches the library method, then an attacker can execute arbitrary shell commands on the host machine. Full impact will depend on the permissions of the process running the `discordrb` library and will likely not be total system access. This issue has been addressed in code, but a new release of the `discordrb` gem has not been uploaded to rubygems. This issue is also tracked as `GHSL-2022-094`.","ecosystems":["RubyGems"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Command injection in discordrb","id":"CVE-2023-28102","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"RubyGems","product":null,"products":[],"type":"command_injection","year":"2023"},"n_packages":2,"n_references":2,"next":{"headline":"Prototype pollution in matrix-react-sdk","id":"CVE-2023-28103"},"packages":[{"ecosystem":"RubyGems","fixed":["3.4.3"],"introduced":["0"],"last_affected":[],"package":"discordrb","purl":null,"source":"GHSA-8832-4mm5-x2r6"},{"ecosystem":"RubyGems","fixed":["3.4.3"],"introduced":["0"],"last_affected":[],"package":"discordrb","purl":"pkg:gem/discordrb","source":"GHSA-8832-4mm5-x2r6"}],"prev":{"headline":"Flatpak metadata with ANSI control codes can cause misleading terminal output","id":"CVE-2023-28101"},"products":["discordrb"],"published":"2023-03-27","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":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2025-02-19","vendors":["shardlab"]},"summary":"Attackers can execute arbitrary shell commands if user input reaches the vulnerable encoder method in the discordrb Ruby library.","url":"https://insights.sbomify.com/CVE-2023-28102/"}