Gitea · Public exploit code

PoC for CVE-2026-125423: symlink overwrites Gitea server hook

· 1 min read

A proof of concept was disclosed for CVE-2026-125423 in Gitea, according to dbugs. A user allowed to create repositories could push a crafted tree during the auto-init window, and writing the README followed a symbolic link and overwrote a server-side hook that runs commands as the Gitea system user. The source describes the fix: the initial commit is now built in a freshly initialized directory and the repository only accepts pushes once initialization completes; update and restrict who can create repositories.

Illustration: PoC for CVE-2026-125423: symlink overwrites Gitea server hook
WhatsApp LinkedIn X
HighVulnerabilityPublic exploit codePatched

In 30 seconds

Observed

A proof of concept has gone public for CVE-2026-125423, a flaw in Gitea, the open source platform teams use to host their own Git repositories. A GitHub repository now carries exploit code for the bug, and the tracker account ptdbugs announced the find on X.github.comgithub.com · rssOpen original sourceSee in source listptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Alleged

The flaw is a race condition, meaning a timing gap, in how new repositories initialize. According to the advisory text shared with the announcement, a repository created with auto-init accepted pushes before initialization finished, so a user already allowed to create repositories could push a crafted tree, and writing the README then followed a symbolic link and overwrote a server-side git hook, which runs commands as the Gitea system user. The described fix closes the gap: the initial commit is built in a freshly initialized directory, and a new repository only accepts pushes once initialization completes.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source listdbu.gsdbu.gs · rssOpen original sourceSee in source list

What happened

Observed

The public trail starts with the tracker account ptdbugs, which posted on X that a PoC, short for proof of concept, had been discovered for CVE-2026-125423. The post links to a dbu.gs advisory record, PT-2026-148055, and to a GitHub repository named cve-2026-125423 that holds the exploit material.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source listgithub.comgithub.com · rssOpen original sourceSee in source listdbu.gsdbu.gs · rssOpen original sourceSee in source list

Alleged

According to the description in that advisory text, the bug worked like this: when a repository was created with auto-init, Gitea accepted pushes before initialization had finished, and the initial commit was built in a checkout of whatever the repository already contained. Content pushed into that window could therefore shape the very tree Gitea was about to write into.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Alleged

The attack rides on that window. A user with permission to create repositories pushes a crafted tree arranged so that writing the README follows a symbolic link, a filesystem shortcut, and lands on a server-side git hook, overwriting it. Hooks run commands as the Gitea system user, so an overwritten hook is a way to run attacker-chosen commands under that account.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Alleged

The advisory text also describes the correction. The initial commit is now built in a freshly initialized directory, and a new repository only becomes ready, and accepts pushes, once its initialization is complete. Both the timing gap and the dirty-checkout problem are addressed in that description.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source listdbu.gsdbu.gs · rssOpen original sourceSee in source list

Why it matters

Inferred

The prerequisite sets a ceiling on risk but does not remove it. Only a user already allowed to create repositories can attempt this, yet on many instances that permission is handed out broadly, to any registered user or any member of an organization. The payoff is a jump from a routine permission to commands running as the Gitea system user, effectively the account that owns the service on the host.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Inferred

Server-side hooks executing as the system user also mean the blast radius is the machine, not one repository. If the PoC works as described, an attacker could pivot from a fresh repo to running commands wherever Gitea runs, which for self-hosted instances often sits inside private networks with access to source code and secrets.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source listgithub.comgithub.com · rssOpen original sourceSee in source list

What to do

Inferred

Operators should watch Gitea's release notes and update as soon as a fixed build is available, then verify the new behavior matches the described fix: pushes rejected until initialization completes. The advisory text spells out the corrected flow, so checking against it is a practical post-upgrade test.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Inferred

Until then, the lever to pull is the entry permission. Restrict who can create repositories, since the whole attack chain starts there, and keep an eye out for unexpected new repositories or modified hooks on existing ones. Skipping auto-init where it is not needed may also shrink exposure, though this batch offers no direct evidence on that mitigation.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Confirmed and still uncertain

Observed

What is established in this batch: the PoC repository exists, the announcement was made, and both the flaw and its fix are described in advisory text tied to CVE-2026-125423 and tracker entry PT-2026-148055.github.comgithub.com · rssOpen original sourceSee in source listptdbugsx.com · ptdbugs · xOpen original sourceSee in source listdbu.gsdbu.gs · rssOpen original sourceSee in source list

Observed

What is not: the affected Gitea versions, the release that carries the fix, and whether anyone has exploited this outside a test bench are all absent from the evidence. The PoC's actual reliability is likewise unverified here, since the advisory record and the GitHub repository surfaced without body text or test output.dbu.gsdbu.gs · rssOpen original sourceSee in source listgithub.comgithub.com · rssOpen original sourceSee in source list

What people are saying

Alleged

The loudest voice is ptdbugs, the tracker account that broke the news. Its post frames the core problem plainly: the initial commit 'was built in a checkout of whatever the repository already contained,' and a user allowed to create repositories could exploit that window so that 'writing the README followed a symbolic link and overwrote a server-side git hook.'ptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Observed

Beyond that post, the conversation in this batch is quiet. The GitHub repository under user grigorovichvlad holds the PoC without commentary, and the dbu.gs record is a bare catalog entry, so no vendor statement, maintainer response, or third-party analysis appears yet.github.comgithub.com · rssOpen original sourceSee in source listdbu.gsdbu.gs · rssOpen original sourceSee in source list

Evolution

Observed

The sequence in the evidence is compact: an advisory record for PT-2026-148055 on dbu.gs, a PoC repository on GitHub, and a public announcement on X, all landing together in the same batch window.dbu.gsdbu.gs · rssOpen original sourceSee in source listgithub.comgithub.com · rssOpen original sourceSee in source listptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Inferred

Read as a timeline, the story moves from advisory to weaponized proof in a single step, with no observed gap between disclosure and exploit code. Defenders usually count on a lag between a flaw being described and working code appearing; here the evidence shows none.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source listgithub.comgithub.com · rssOpen original sourceSee in source list

Reach

Observed

2 independent groups, 1 updates, and 0 engagements.

Technical detail

Alleged

In effect this is a time-of-check-to-time-of-use race, a class of bug where a system validates state and then acts while the state can still change. In the vulnerable flow, Gitea treated a repository as pushable before initialization finished, and built the initial commit from whatever the repository directory already contained.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Alleged

The symlink step is what turns the timing gap into an overwrite of server files. The pushed tree places a symbolic link where the README should be written, so Gitea's own README write follows the link onto a file in the server's hook directory and replaces it. Git hooks execute shell commands when events such as pushes occur, and Gitea runs them as its system user, which makes the overwritten file attacker-controlled executable content.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source list

Alleged

The fix, as described, removes both preconditions. Building the initial commit in a freshly initialized directory means no pushed content can be waiting in the checkout, and gating repository readiness on completed initialization means there is no window left to push into.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source listdbu.gsdbu.gs · rssOpen original sourceSee in source list

Sources and evidence

Observed

This item rests on three artifacts: the ptdbugs post on X carrying the full flaw description, the dbu.gs advisory record for PT-2026-148055, and the GitHub repository holding the PoC. All descriptive detail about mechanics and fix traces to the announcement text, because the advisory page and the repository appeared in the batch without body content.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source listdbu.gsdbu.gs · rssOpen original sourceSee in source listgithub.comgithub.com · rssOpen original sourceSee in source list

Inferred

Confidence is moderate. The flaw description reads as vendor advisory language, which is a strong signal but not a substitute for a patched release or a diff in hand, and the PoC is untested in this batch. Claims about impact should be treated as researcher-demonstrated until Gitea ships or confirms a fix.ptdbugsx.com · ptdbugs · xOpen original sourceSee in source listgithub.comgithub.com · rssOpen original sourceSee in source list

Sources

  1. github.comgithub.com · rss
  2. ptdbugsx.com · ptdbugs · x
  3. dbu.gsdbu.gs · rss

Incidents like this, every morning

The ones that need action first, in a 3-minute read.

Free · 1 email a day, in the morning · no spam, unsubscribe in 1 click

Get the next one tomorrow morning

One email a day with what changed, what to fix first and how.

Free · 1 email a day, in the morning · no spam, unsubscribe in 1 click

Share it with your team

Whoever handles security with you should get it too.

LinkedIn X

Your colleague gets a confirmation request. Nothing is sent unless they confirm.

See all news

Read also

Before you go: get this every day

The HIFY Radar daily edition lands every morning with the incidents that need action. Free.

Free · 1 email a day, in the morning · no spam, unsubscribe in 1 click