CVE-2018-18926: Remote Code Execution (RCE) in code.gitea.io/gitea

code.gitea.io/gitea Updated 02 Oct 2025

Summary

15/02/2022
Yes i
Critical
9.8

CVE-2018-18926: Gitea Remote Code Execution (RCE). Affects code.gitea.io/gitea versions < 1.5.2. Fixed in 1.5.2. How to fix ↓

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

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

code.gitea.io/gitea is an open-source Git service written in Go. It provides a self-hosted platform for managing Git repositories, user authentication, and collaboration features. The vulnerability identified as CVE-2018-18926 allows remote code execution due to improper validation of session IDs in the go-macaron/session code for Macaron.

Vulnerability Detail

The vulnerability in code.gitea.io/gitea allows an attacker to execute arbitrary code remotely. By exploiting the improper validation of session IDs, an attacker can gain unauthorized access to the system and execute malicious code. This can lead to various consequences, including data theft, privilege escalation, and further compromise of the affected system. The vulnerability has a CVSS score of 8.1, indicating a critical severity level.

How To Fix

Latest published version: v1.26.4 as of 22 Oct 2026

go get code.gitea.io/gitea@v1.26.4

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.5.2

This is the first release that contains the fix.

go get code.gitea.io/gitea@v1.5.2

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

Workaround

If updating to the latest version is not immediately feasible, a temporary workaround is to disable the affected functionality or restrict access to the vulnerable system. This can be achieved by modifying the configuration settings or implementing network-level controls. However, applying the official fix by updating to the latest version is strongly advised.

Conclusion

The vulnerability CVE-2018-18926 in code.gitea.io/gitea allows remote code execution, posing a significant risk to the affected systems. To mitigate this vulnerability, it is crucial to update code.gitea.io/gitea to version 1.5.4 or later. Regularly updating the software and applying security patches is essential for maintaining a secure environment. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for code.gitea.io/gitea →

Share this vulnerability

FAQ

code.gitea.io/gitea is an open-source Git service written in Go. It provides a self-hosted platform for managing Git repositories, user authentication, and collaboration features.

The vulnerability allows remote code execution, enabling an attacker to execute arbitrary code on the affected system. This can lead to data theft, privilege escalation, and further compromise of the system.

To fix this vulnerability, update code.gitea.io/gitea to version 1.5.4 or later. Regularly updating the software is important to apply the latest security patches.

A temporary workaround is to disable the affected functionality or restrict access to the vulnerable system. However, it is strongly recommended to apply the official fix by updating to the latest version.

The vulnerability has a CVSS score of 8.1, indicating a critical severity level.

Related vulnerabilities

Recent vulnerabilities recorded for code.gitea.io/gitea.

How To Fix

Latest published version: v1.26.4 as of 22 Oct 2026

go get code.gitea.io/gitea@v1.26.4

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.5.2

This is the first release that contains the fix.

go get code.gitea.io/gitea@v1.5.2

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