CVE-2023-28102 json
Command injection in discordrb
published 3y ago modified 4mo ago also GHSA-8832-4mm5-x2r6 , EUVD-2024-0871
- cvss
- 8.4
- version 3.1, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 2.6%
- EPSS 2.6% chance of exploitation in 30 days, percentile 85%
- public exploits
- 0
- none known
Summary
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`.
Patch / fix
- rubygems discordrb 3.4.3
- discordrb_project discordrb 2023-03-08
Is CVE-2023-28102 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- total
- Assessed
- last yr.
Exploit prediction
2.57% chance of exploitation in the next 30 days, higher than 85% of all scored CVEs (FIRST EPSS, 2026-11-14).
Exploits and checks
- securitylab.github.com https://securitylab.github.com/advisories/GHSL-2022-094_discordrb/ referenced PoC, tagged "exploit" by a source, unverified
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 3.1 | 8.4 | CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:H/I:H/A:H |
| NVD | 3.1 | 9.6 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H |
| GitHub | 3.1 | 9.6 | CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| rubygems | discordrb | <3.4.3 |
3.4.3 |
Affected products
- shardlab discordrb
Classification
- Weakness
-
- CWE-78 Improper Neutralization of Special Elements used in an OS Command
References
-
github.com
/shardlab/discordrb/commit/91e13043ffa89227c3fcdc3408f06da237d28c95
web, patch
-
securitylab.github.com
/advisories/GHSL-2022-094_discordrb/
exploit, third-party-advisory
-
nvd.nist.gov
/vuln/detail/CVE-2023-28102
advisory
-
github.com
/rubysec/ruby-advisory-db/blob/master/gems/discordrb/CVE-2023-28102.yml
web
-
github.com
/shardlab/discordrb
package
-
securitylab.github.com
/advisories
web
-
securitylab.github.com
/advisories/GHSL-2022-094_discordrb
advisory
Sources
- CVE List CVE-2023-28102
- GitHub Advisory GHSA-8832-4mm5-x2r6
- NVD CVE-2023-28102
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.