Gitea SSH Key Parser Denial of Service (CVE-2026-56657)
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.
AI Analysis
Technical Summary
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.
Gitea SSH Key Parser Denial of Service (CVE-2026-56657)
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
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
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.
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 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
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
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.