CVE-2026-118389

Gitea RubyGems compact index injection through package metadata

Published Nov 15, 2026 CVSS n/a EPSS n/a KEV · Not listed
Description
The RubyGems package registry accepted gems whose platform, dependency names or dependency version requirements contain newline characters. Because the compact index served to clients is line-based, a user who can publish a gem to an owner's registry could forge index entries, such as packages that do not exist or additional versions of an existing gem with dependencies of their choice. Clients that resolve gems from that registry could then be led to install attacker-chosen dependencies. Gems with such metadata are now rejected.

Analysis

AI-generated

Technical impact

The vulnerability allows a user who can publish a gem to a Gitea‑hosted registry to include newline characters in the gem’s platform, dependency names, or dependency version requirements. Because the compact index the registry serves to clients is line‑based, these newlines enable forging of index entries, such as non‑existent packages or additional versions of existing gems. A client resolving gems from the registry may then install attacker‑chosen dependencies, potentially leading to arbitrary code execution. The weakness is a classic form of input tampering and is classified as CWE‑74.

Affected Systems

The affected product is the Gitea platform. Versions prior to the release of 28.4.0 are susceptible, as the update in that release introduces validation that rejects gems containing metadata with newline characters. The issue was addressed in the 28.4.0 release and later versions.

Risk and Exploitability

A successful exploit requires the attacker to have publish rights to a registry that belongs to a repository owner. Once a malicious gem is uploaded, clients that resolve gems from that registry will be forced to install the attacker-specified dependencies, which can include malicious code. Although an EPSS score is not available and the vulnerability is not listed in the CISA KEV catalog, the nature of the impact—forced installation of arbitrary dependencies—indicates a high severity scenario, especially in environments where repository owners have broad publish privileges.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade Gitea to version 28.4.0 or later, which validates gem metadata and rejects entries containing newline characters.
  • Restrict the set of users who can publish to your Gitea registry and enforce strict ownership checks before allowing gem uploads.
  • If an immediate upgrade is not possible, monitor uploaded gem metadata for unexpected newline characters and remove or quarantine any offending packages to prevent malicious dependency resolution.

Generated by OpenCVE AI on November 15, 2026 at 22:26 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
First Time appeared Gitea
Gitea gitea
Vendors & Products Gitea
Gitea gitea
Type Values Removed Values Added
Description The RubyGems package registry accepted gems whose platform, dependency names or dependency version requirements contain newline characters. Because the compact index served to clients is line-based, a user who can publish a gem to an owner's registry could forge index entries, such as packages that do not exist or additional versions of an existing gem with dependencies of their choice. Clients that resolve gems from that registry could then be led to install attacker-chosen dependencies. Gems with such metadata are now rejected.
Title Gitea RubyGems compact index injection through package metadata
Weaknesses CWE-74
References
Weaknesses
  • CWE-74

    Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')

Sources

Status
PUBLISHED
Assigner
Gitea
Published
Updated
Nov 15, 2026, 9:13 PM
Reserved
Nov 15, 2026, 8:29 PM
Status
Deferred
Published
Nov 15, 2026, 10:17 PM
Modified
Nov 15, 2026, 10:17 PM