# CVE-2024-35221: Denial of service when publishing a package on rubygems.org

- Severity: Medium 4.3 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.49%, higher than 44% of CVEs (2026-12-01)
- Published: 2024-05-29T20:18:06.763Z
- Modified: 2026-06-17T07:34:34.257Z
- Weaknesses: CWE-400
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial
- Assigned by: GitHub_M

## Description

Rubygems.org is the Ruby community's gem hosting service. A Gem publisher can cause a Remote DoS when publishing a Gem. This is due to how Ruby reads the Manifest of Gem files when using Gem::Specification.from_yaml. from_yaml makes use of SafeYAML.load which allows YAML aliases inside the YAML-based metadata of a gem. YAML aliases allow for Denial of Service attacks with so-called `YAML-bombs` (comparable to Billion laughs attacks). This was patched. There is is no action required by users. This issue is also tracked as GHSL-2024-001 and was discovered by the GitHub security lab.

(As written by CVE List.)

## Affected

- rubygems rubygems.org: < 2024-04-12

## References

- <https://github.com/rubygems/rubygems.org/security/advisories/GHSA-4vc5-whwr-7hh2>
- <https://en.wikipedia.org/wiki/Billion_laughs_attack>
- <https://github.com/ruby/ruby/blob/7cf74a2ff28b1b4c26e367d0d67521f7e1fed239/lib/rubygems/safe_yaml.rb#L28>

## Sources

- CVE List: [CVE-2024-35221](https://www.cve.org/CVERecord?id=CVE-2024-35221), CVE Terms of Use, modified 2024-08-02
- NVD: [CVE-2024-35221](https://nvd.nist.gov/vuln/detail/CVE-2024-35221), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-35221 · Whole record: https://cve.day/CVE-2024-35221.json · Rebuilt by cve.day 2026-11-25T22:58:41.077Z
