Skip to main content
Press slash or control plus K to focus the search. Use the arrow keys to navigate results and press enter to open a threat.
Reconnecting to live updates…

Gitea SSH Key Parser Denial of Service (CVE-2026-56657)

0
Medium
Published: 07/21/2026 (07/21/2026, 21:09:57 UTC)
Source: GCVE Database
Product: code.gitea.io/gitea

Description

Gitea versions prior to 1.27.0 contain a denial of service vulnerability in the SSH key ingestion endpoint. The vulnerability arises from an O(N²) string concatenation loop in the SSH2 key normalization function, which lacks input size limits. An authenticated user can submit a maliciously large RFC 4716 (SSH2) formatted SSH key, causing excessive CPU and memory consumption that can take the server offline.

CVSS v4.0

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vuln. Confidentiality
None
Vuln. Integrity
None
Vuln. Availability
Low
Subsq. Confidentiality
None
Subsq. Integrity
None
Subsq. Availability
None
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N

Affected software

Goghsa
code.gitea.io/gitea
Affected versions
<1.27.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/22/2026, 00:44:51 UTC

Technical Analysis

Gitea's SSH key ingestion endpoint accepts SSH2 format keys and normalizes them before storage. The normalization function concatenates key content line-by-line using an inefficient O(N²) algorithm without limiting input size. An attacker can exploit this by submitting a large number of short lines in a malicious SSH2 key, causing quadratic growth in CPU and memory usage. This leads to resource exhaustion and denial of service. The vulnerability affects versions prior to 1.27.0. The key validity check occurs only after the expensive concatenation, so the server performs the costly operation regardless of key validity. No size constraints exist on the API or web form fields to prevent this attack.

Potential Impact

Any authenticated user can exploit this vulnerability to exhaust the server's CPU and memory resources by submitting a specially crafted large SSH2 public key. This results in denial of service by taking the Gitea instance offline due to resource exhaustion. There is no indication of privilege escalation or data compromise from this vulnerability.

Mitigation Recommendations

Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until a fix is available, restrict or monitor authenticated user submissions of SSH keys to prevent excessively large inputs. Consider implementing input size limits or rate limiting on the SSH key ingestion endpoint to mitigate exploitation risk.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Gcve Source
db.gcve.eu
Osv Id
GHSA-4xjf-493q-98p3
Osv Schema Version
1.4.0
Aliases
["CVE-2026-56657"]
Ecosystems
["Go"]
Database Specific Severity
MODERATE
Cvss Version
4.0

Threat ID: 6a600ab09c2644c7f8fe1a46

Added to database: 07/22/2026, 00:11:28 UTC

Last enriched: 07/22/2026, 00:44:51 UTC

Last updated: 07/31/2026, 12:28:12 UTC

Views: 7

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses