In this article
What's fixed
Gitea's package registry accepts RubyGems packages whose platform, dependency name or version requirement fields contain newline characters. The compact index is line-based, so an attacker can forge phantom entries in /versions and fake version entries in info/<name>. A developer whose Gemfile names a real package can then get the attacker's gem installed by bundler as a transitive dependency.
The advisory rates it high, CVSS 8.1, with a network vector, low privileges and no user interaction. Attacker code can run on developer machines through gem install hooks, and the victim sees nothing odd because the Gemfile names a real package. Gitea 28.2.0 and earlier are affected, and 28.3.0 is the patched version. The advisory does not say whether the flaw is exploited in the wild.
What to do
If your Gitea instance hosts RubyGems packages, update to 28.3.0. The fix, commit c52e7c0c, rejects \r and \n in those metadata fields before they are stored. No workaround for unpatched instances is given, so updating is the only listed remedy.
| Product | Affected | Fixed |
|---|---|---|
| Gitea | <= 28.2.0 | 28.3.0 |
Sources
Image: Photo by Towfiqu barbhuiya on Unsplash
This story was produced with AI assistance from the sources listed above and fact-checked against them before publication. Read our editorial methodology and the corrections log. Spotted an error? Email [email protected].




Discussion