Ptechhub
  • News
  • Industries
    • Enterprise IT
    • AI & ML
    • Cybersecurity
    • Finance
    • Telco
  • Brand Hub
    • Lifesight
  • Blogs
No Result
View All Result
  • News
  • Industries
    • Enterprise IT
    • AI & ML
    • Cybersecurity
    • Finance
    • Telco
  • Brand Hub
    • Lifesight
  • Blogs
No Result
View All Result
PtechHub
No Result
View All Result

Critical RubyGems Flaw Could Have Let Any Gem Publisher Run Code on the Registry

The Hacker News by The Hacker News
November 30, 2026
Home Cybersecurity
Share on FacebookShare on Twitter


Swati KhandelwalNov 30, 2026Vulnerability / Application Security

RubyGems.org, the central registry for the Ruby community’s gems, has fixed a critical flaw that let any account with a push-capable API key feed an attacker-controlled regular expression into the metadata of a gem upload.

In local testing, the registry’s maintainers chained the flaw with a memory corruption bug in Ruby’s regexp compiler and reached remote code execution, they said in an advisory last week. Gem users do not need to do anything.

A review of production telemetry and 29,100 gems published between October 5 and November 4 found “no direct evidence of exploitation,” the advisory says. Gaps remain: logs were not kept long enough, and upload payloads were not recorded, so earlier attempts cannot be ruled out.

The flaw is tracked as GHSA-7h7w-m82c-x2xg and scores 9.0 on the CVSS scale, with no CVE assigned. It sat in how the registry reads the metadata a gem carries as YAML.

The validator that screens that metadata ignored the !ruby/regexp YAML tag, so a field carrying the tag passed schema checks as plain text. Ruby’s YAML library, Psych, then turned the field into a real regular expression, compiling whatever pattern the attacker supplied.

All of this ran before the registry checked whether the account owned the gem name, so an attacker needed no gem of their own, only a push-capable API key.

The test ran on Ruby 4.0.9, a version affected by the seven flaws in Ruby’s regexp engine and string case conversion that the Ruby project patched on November 18. The advisory does not say which memory corruption bug the chain used.

Even on a Ruby build that is not vulnerable to code execution, compiling an attacker’s pattern can crash an upload worker or exhaust its memory.

On the hosted service, schema validation now rejects regexp-tagged gemspec fields with an HTTP 422 error, according to the registry’s security advisory. Gem metadata is also read with a restricted loader that refuses YAML aliases and allows only the handful of classes a valid gemspec uses. Patterns in OIDC access policies are capped at 255 characters before they are compiled, as an extra safeguard.

The validation change entered the registry’s public code repository on November 4 (UTC), three weeks before the disclosure; its commit history shows.

What to do:

  • Gem users: nothing. The hosted registry is fixed.
  • Operators who self-host the RubyGems.org software: update to a commit containing the fix.
  • Ruby applications have a separate job: the seven runtime flaws are fixed in Ruby 4.0.10, 3.4.13 and 3.3.14, listed in the Ruby project’s security announcement.

The registry hosts about 199,000 gems and has counted more than 278 billion downloads, its statistics page shows.

The code execution in the maintainers’ test came with the privileges of the gem-upload worker, in a local environment. The advisory does not say whether an attacker who got that far could have reached published gems or publishing credentials.



Source link

The Hacker News

The Hacker News

Next Post

Why AI roadmaps can’t be static

Recommended.

Huawei lancia la soluzione AI Education Center (AIEC)

Huawei lancia la soluzione AI Education Center (AIEC)

March 8, 2026

Une étape majeure pour la biométrie des empreintes digitales sans contact : DERMALOG se qualifie pour le prestigieux programme NIST FastCAP

November 4, 2026

Trending.

Hollyland presentará soluciones de audio e imagen de última generación en IFA 2026

August 20, 2026

Huawei Digital Power představila na veletrhu IDEE 2026 řešení pro různé scénáře s využitím technologie tvorby sítě a umělé inteligence

September 20, 2026
China’s AI Boyfriend Business Is Taking On a Life of Its Own

China’s AI Boyfriend Business Is Taking On a Life of Its Own

January 20, 2026
Amazon Q2 Earnings: AWS AI Demand Outpaces Capacity Through 2027, Jassy Says

Amazon Q2 Earnings: AWS AI Demand Outpaces Capacity Through 2027, Jassy Says

July 31, 2026
IDCA datacentres report: Global concentration and the Goldilocks zone | Computer Weekly

IDCA datacentres report: Global concentration and the Goldilocks zone | Computer Weekly

May 12, 2026

PTechHub

A tech news platform delivering fresh perspectives, critical insights, and in-depth reporting — beyond the buzz. We cover innovation, policy, and digital culture with clarity, independence, and a sharp editorial edge.

Follow Us

Industries

  • AI & ML
  • Cybersecurity
  • Enterprise IT
  • Finance
  • Telco

Navigation

  • About
  • Advertise
  • Privacy & Policy
  • Contact

Subscribe to Our Newsletter

  • About
  • Advertise
  • Privacy & Policy
  • Contact

Copyright © 2025 | Powered By Porpholio

No Result
View All Result
  • News
  • Industries
    • Enterprise IT
    • AI & ML
    • Cybersecurity
    • Finance
    • Telco
  • Brand Hub
    • Lifesight
  • Blogs

Copyright © 2025 | Powered By Porpholio