Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-59774-poc — PoC for Gitea versions before 1.27.1 is vulnerable to Path Traversal (CWE-22), which leads to unauthenticated arbitrary file read / information disclosure leading to RCE CVSS 9.8 | Kitploit
Tools/GitHubGitHub/asvorg/cve-2026-59774-poc
Vulnerability AnalysisExploitationWeb Application ExploitationInformation GatheringWeb Security
GitHubasvorg/cve-2026-59774-poc

CVE-2026-59774-poc

PoC for Gitea versions before 1.27.1 is vulnerable to Path Traversal (CWE-22), which leads to unauthenticated arbitrary file read / information disclosure leading to RCE CVSS 9.8

View Repository
1327 days agoNot yet reviewed
Share

Gitea CVE-2026-59774 — unauthenticated arbitrary file read to RCE

(RCE NOT YET IMPLEMENTED, only file read)

A Python-based baseline and regression-testing project for investigating CVE-2026-59774, an unauthenticated file-disclosure vulnerability in Gitea's Org-mode markup renderer.

Scope: Authorized local testing only. This project is intended for controlled security research and patch validation.

Overview

Gitea's Org-mode renderer processed user-supplied #+INCLUDE directives without adequately restricting filesystem access. Under affected configurations, an unauthenticated request to a suitable public repository's markup endpoint could expose files readable by the Gitea service account.

  • CVE: CVE-2026-59774
  • Severity: Critical (CVSS 9.8)
  • CWE: CWE-22 — Path Traversal
  • Impact: Potential unauthorized file disclosure, code execution
  • Affected versions: Gitea 1.22 through versions earlier than 1.27.1
  • Fixed version: Gitea 1.27.1

Root cause

Gitea’s Org-mode renderer processed user-controlled #+INCLUDE directives in the public markup endpoint without adequately restricting the filesystem path being read. In affected versions, an unauthenticated request could send a crafted payload to the repository markup handler with a repository context and a file path such as /etc/hosts or another local file. Because the server resolved and returned the included content without enforcing a safe path boundary, the request enabled arbitrary local file disclosure (CWE-22 / path traversal). The flaw exists in the public rendering flow, which is why it can be reached without authentication in vulnerable configurations.

Impact

This vulnerability allows an attacker to read arbitrary files from the host running Gitea, including sensitive configuration, credentials, environment data, and other local content. In containerized or shared deployments, this may expose mounted secrets, SSH keys, service configuration, and application data. While the disclosed information is primarily a file-read primitive, the leaked data can be used to pivot further into the environment and may enable privilege escalation or remote code execution depending on the deployment. Affected Gitea versions are 1.22 through versions earlier than 1.27.1; the upstream fix was included in Gitea 1.27.1.

I will include the RCE functionality later on.

Requirements

  • Python 3.9 or newer
  • A disposable Gitea instance
  • A test repository owned by your lab account
  • The requests Python package

Install the dependency:

python -m pip install requests

Lab Setup

  1. Start Gitea in an isolated environment.
  2. Bind its HTTP service to 127.0.0.1.
  3. Create a dedicated test user and repository.
  4. Avoid mounting host secrets, SSH keys, or the Docker socket into the container.
  5. Prepare separate vulnerable and patched instances if you need a version comparison.

Use Gitea 1.27.0 for the affected-version comparison and 1.27.1 or a later patched release for regression testing.

Running the Baseline Checker

Save the script as poc.py.

python3 poc.py -u http://localhost:3000 -r pwn/pwn -f file/to/read

The script checks local instance connectivity and reports the HTTP status and reponds with the file contents.

Safety Restrictions

  • Do not run tests against systems you do not own or have explicit authorization to assess.
  • Do not attempt to extract real credentials, internal tokens, or production configuration.
  • Do not test the remote-code-execution chain as part of this project.
  • Keep the vulnerable instance isolated from untrusted networks.
  • Destroy or rebuild the vulnerable lab after testing.

Disclaimer

This project is for educational security research, authorized testing, and defensive regression validation. The author assumes no responsibility for unauthorized use. In testing, several WAFs seem to block this PoC.

References

  • Official Gitea security advisory
  • Upstream fix
  • Gitea 1.27.1 release notes

This project is for educational security research, authorized testing, and defensive regression validation. The author assumes no responsibility for unauthorized use.

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    916
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    558
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    370
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    360
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    317
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    289

Explore all tools

Browse our collection of tools

View all tools →