{"id":"CVE-2023-28102","published":"2023-03-27T21:23:29Z","modified":"2025-02-19T15:52:01Z","title":"Command injection in discordrb","vendor":"shardlab","product":"discordrb","tier":"tail","description":{"text":"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`.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.4,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.02567,"percentile":0.85519,"provenance":"source"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"references":[{"url":"https://securitylab.github.com/advisories/GHSL-2022-094_discordrb/","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/shardlab/discordrb/commit/91e13043ffa89227c3fcdc3408f06da237d28c95","tags":["x_refsource_MISC"]}],"priority":{"score":23.0,"factors":[{"name":"EPSS percentile","points":17.1},{"name":"CVSS severity","points":5.88}]},"vendorSlug":"shardlab","affectedVersions":[{"vendor":"shardlab","product":"discordrb","versions":["<= 3.4.1"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2025-02-19T15:51:55.831991Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"RubyGems","package":"discordrb","vulnerableRanges":["<3.4.3"],"patched":["3.4.3"],"from":["GHSA-8832-4mm5-x2r6"],"provenance":"source"}],"summary":{"text":"The flaw is a command injection weakness in the encoder.rb file of discordrb, shardlab's Ruby implementation of the Discord API, where a shell string is built unsafely from the file parameter. An attacker can run arbitrary shell commands on the host, with impact limited by the permissions of the process running the library, but only if a client application calls the vulnerable method with attacker-controlled input and the attacker can reach that input, which is the library itself is not directly exploitable and requires user interaction in the sense of the calling application's workflow.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:40:25Z"},"euvd":{"id":"EUVD-2024-0871","exploited":false,"provenance":"source"}}