CVE-2026-20904 Overview
CVE-2026-20904 is a Broken Access Control vulnerability in Gitea, a self-hosted Git service. The vulnerability exists because Gitea does not properly validate ownership when toggling OpenID URI visibility. An authenticated user may be able to change the visibility settings of other users' OpenID identities, potentially exposing sensitive authentication information or allowing attackers to manipulate identity configurations.
Critical Impact
Authenticated attackers can modify the visibility settings of other users' OpenID identities, potentially exposing sensitive authentication information or disrupting identity management.
Affected Products
- Gitea versions prior to 1.25.4
Discovery Timeline
- 2026-01-22 - CVE CVE-2026-20904 published to NVD
- 2026-01-22 - Last updated in NVD database
Technical Details for CVE-2026-20904
Vulnerability Analysis
This vulnerability is classified under CWE-284 (Improper Access Control), indicating that the application fails to properly restrict access to a resource or function. In the context of Gitea, the OpenID URI visibility toggle functionality lacks proper ownership validation, allowing any authenticated user to potentially manipulate the visibility settings of OpenID identities belonging to other users.
The flaw stems from an improper authorization check in the code path that handles OpenID visibility toggling. When a user attempts to modify the visibility of an OpenID URI, the application does not adequately verify that the requesting user is the legitimate owner of that OpenID identity. This allows for horizontal privilege escalation where users can affect resources belonging to other users at the same privilege level.
Root Cause
The root cause is an improper access control implementation in the OpenID URI visibility toggle functionality. The application fails to validate that the user making the request is the actual owner of the OpenID identity being modified before processing the visibility change. This authorization bypass allows authenticated users to manipulate resources they should not have access to.
Attack Vector
An attacker with a valid authenticated session on a Gitea instance can exploit this vulnerability by intercepting and modifying requests to the OpenID visibility toggle endpoint. By manipulating the request parameters to reference another user's OpenID identity, the attacker can change the visibility settings without proper authorization.
The attack requires:
- A valid authenticated account on the target Gitea instance
- Knowledge or enumeration of other users' OpenID identity identifiers
- The ability to craft requests to the OpenID visibility toggle endpoint
The vulnerability can be exploited through direct API manipulation or by modifying web requests in transit. For detailed technical information, refer to the GitHub Security Advisory GHSA-jrpc-w85r-hgqx.
Detection Methods for CVE-2026-20904
Indicators of Compromise
- Unexpected changes to OpenID URI visibility settings for user accounts
- Log entries showing OpenID visibility modifications by users who do not own those identities
- Anomalous API requests to OpenID-related endpoints with mismatched user context
Detection Strategies
- Monitor application logs for OpenID visibility toggle operations where the acting user differs from the identity owner
- Implement audit logging for all identity management operations
- Review access logs for unusual patterns of requests to OpenID management endpoints
- Deploy web application firewalls with rules to detect parameter manipulation attacks
Monitoring Recommendations
- Enable detailed audit logging for all user profile and identity management operations
- Configure alerts for bulk or rapid OpenID visibility changes across multiple users
- Monitor for enumeration attempts against user OpenID endpoints
- Review and correlate authentication logs with OpenID management activity
How to Mitigate CVE-2026-20904
Immediate Actions Required
- Upgrade Gitea to version 1.25.4 or later immediately
- Audit OpenID visibility settings across all user accounts for unauthorized modifications
- Review access logs for signs of exploitation prior to patching
- Consider temporarily disabling OpenID functionality if immediate patching is not possible
Patch Information
The vulnerability has been addressed in Gitea version 1.25.4. The fix implements proper ownership validation before allowing visibility changes to OpenID identities. Organizations should upgrade to this version or later to remediate the vulnerability.
For detailed patch information, see:
Workarounds
- Disable OpenID authentication functionality until the patch can be applied
- Implement network-level access controls to restrict access to the Gitea instance
- Use a reverse proxy to add additional authentication layers before reaching the application
- Monitor and alert on any OpenID-related API requests as an interim measure
# Example: Disable OpenID in Gitea configuration (app.ini)
[openid]
ENABLE_OPENID_SIGNIN = false
ENABLE_OPENID_SIGNUP = false
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


