CVE-2021-45325: Server Side Request Forgery (SSRF) in Gitea

gitea Updated 02 Oct 2025

Summary

06/03/2024
Yes i
High
Not published

CVE-2021-45325: Server Side Request Forgery (SSRF) vulneraility exists in Gitea before 1.7.0 using the OpenID URL. Affects gitea versions < 1.7.0. Fixed in 1.7.0. How to fix ↓

Also tracked for

The same CVE-2021-45325 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Gitea is an open-source self-hosted Git service that provides a lightweight interface for managing repositories, users, and organizations. It is widely used for version control and collaboration in software development projects. However, Gitea versions prior to 1.7.0 are vulnerable to Server Side Request Forgery (SSRF) attacks when using the OpenID URL.

Vulnerability Detail

The Server Side Request Forgery (SSRF) vulnerability in Gitea allows an attacker to make arbitrary HTTP requests from the vulnerable server. By exploiting this vulnerability, an attacker can potentially access internal resources, bypass security controls, and perform actions on behalf of the server. This can lead to unauthorized data exposure, privilege escalation, and other serious consequences. The vulnerability originates from the improper handling of user-supplied input in the OpenID URL.

How To Fix

Minimum fixed version

1.7.0

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If upgrading to the latest version is not immediately feasible, a temporary workaround is to disable the OpenID functionality in Gitea. This can be achieved by modifying the configuration settings to remove or comment out the OpenID related configurations. However, it is important to note that this workaround may impact the functionality and user experience of Gitea.

Conclusion

The Server Side Request Forgery (SSRF) vulnerability in Gitea poses a significant risk to the security and integrity of the application. It is crucial to promptly upgrade to the latest version or apply the provided workaround to mitigate the vulnerability. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for gitea →

Share this vulnerability

FAQ

Gitea is an open-source self-hosted Git service that provides a lightweight interface for managing repositories, users, and organizations.

Server Side Request Forgery (SSRF) is a vulnerability that allows an attacker to make arbitrary HTTP requests from the vulnerable server, potentially accessing internal resources and bypassing security controls.

The vulnerability in Gitea can lead to unauthorized data exposure, privilege escalation, and other serious consequences.

To fix this vulnerability, it is recommended to upgrade Gitea to version 1.7.0 or later.

Yes, a temporary workaround is to disable the OpenID functionality in Gitea by modifying the configuration settings.

Related vulnerabilities

Recent vulnerabilities recorded for gitea.

How To Fix

Minimum fixed version

1.7.0

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback