GitLab's off-cycle Git fix: a merge request can run code on Gitaly, and source installs need two patches
GitLab's November 10 critical patch fixes a Git heap overflow that any user who can create a project and open a merge request can reach on self-managed servers. Here are the fixed builds, the second Git that source installs miss, and how to hunt for attempts.
part 44 of 45 · Platform releases, explained from scratchthe ideaOne merge request can overflow Git on the server. Source installs need two patches.
after reading, you can- See which GitLab build fixes CVE-2026-105437 on the line you run, and which lines get no fix at all
- Find the second copy of Git that source installs have to patch by hand
- Run GitLab's log searches for failed attempts and decide what to rotate if you were exposed
GitLab put out an unscheduled critical patch on November 10 for a flaw in the Git program it bundles. Someone who can create a project and open a merge request on your server can use it to run commands on the machine that stores your repositories. If you run GitLab yourself, get to 19.5.4, 19.4.6 or 19.3.8 or later this week. If you compiled GitLab from source, there are two copies of Git to fix, and the upgrade only covers one of them.
A booby-trapped merge request can take over the server that keeps your code, and nobody has to approve it
Open a merge request and GitLab runs a test merge in the background, so the page can say whether the change goes in cleanly. Git does that merge. It adds up how much memory the result needs, reserves that much and writes into it. A crafted file pushes the total so high that the counter wraps round to a small number, and Git keeps writing long after the space runs out. GitLab says an attacker can use that to run commands on Gitaly, the part of GitLab that keeps every repository. Nobody has to approve or even look at the merge request.
Picture a mail room that weighs each parcel and picks a box to fit. The scale only goes up to a certain weight, and past that it rolls back to zero. Someone sends a parcel heavy enough to roll the scale over, it gets a tiny box, and the contents spill across the shelves where everyone else's post sits.
- Anyone running GitLab on their own servers
- Teams that compiled GitLab from source
- Companies whose GitLab accepts outside sign-ups
- GitHub Enterprise Server admins
- Platform teams with Git on build servers
- Terraform teams whose code lives in GitLab
Why it matters to you
The person who can trigger this doesn't need admin rights. GitLab's own detection notes say any signed-in user who can create a project and open a merge request can reach it, and nobody else has to click anything. On a server with open sign-up, that's anyone on the internet who registers an account.
Two scores can look like a contradiction. The CVE record gives 7.5 because it describes Git in general, where an attacker needs someone to merge their branch. On GitLab, the server does that merge by itself every time a merge request opens, so GitLab treats it as critical and told self-managed customers to upgrade immediately. Plan on GitLab's rating.
Gitaly holds every repository on its node, so a takeover there reaches far past one project. Code, CI configuration, Terraform modules and any secret someone committed by mistake are all readable, and an attacker with write access can change code without opening a merge request at all. As of November 16 the flaw isn't on CISA's Known Exploited Vulnerabilities list, and GitLab's notes don't mention attacks. That's a head start, and it won't last once someone works out the exploit from the public fix.
-
01 Push a prepared branch
Someone pushes prepared branches to a project they own. One carries a .gitattributes file that sets conflict-marker-size to an absurd number, and the files are built to conflict many times.
-
02 Open a merge request
Opening it makes GitLab ask Gitaly whether the branches merge cleanly. No reviewer has to do anything.
-
03 The size counter wraps
Git adds up the size of the merged output in a 32-bit number. Many oversized conflict markers push it past 4 GiB, and it rolls over to a small value.
-
04 Git writes past the buffer
Git reserves the small amount anyway, then writes the full merge result. Most of that data was shaped by the attacker, and it lands on memory Git doesn't own.
-
05 Commands run on Gitaly
A failed try just crashes Git. A working one can run commands as the git user, with read and write access to every repository on that node.
For engineers: the Git CVE text says any command that does a textual three-way merge can hit this, including merge, rebase, cherry-pick and merge-tree. Forges are the exposed case when they run merge-tree on the server and read attributes from the repository's own tree. GitLab's write-up names the two Gitaly calls involved, UserMergeToRef for the mergeability checkdefinitionWhen a merge request opens, GitLab quietly tries the merge to see if it would work. That's where the page's merge status and its list of conflicts come from. and ListConflictFiles for the conflicts list. The pushed data stays small, because the giant output only appears during the merge.
What GitLab and Git fixed
The fix is in Git, so GitLab fixed it by shipping a patched Git inside its packages and images. Git now does the size sums in a wider type and checks every addition, so an oversized merge stops with an error. That's why the advice changes with how you installed GitLab.
What changed on November 10, and the week after
Ad hoc critical patch for self-managed CE and EE. The Linux packages and container images carry the patched Git. No new database migrations.
Git 2.55.1, 2.54.1, 2.53.1, 2.52.1, 2.51.3 and 2.50.2 fix the same six flaws, including this one.
GitHub says builds 3.19.15, 3.20.11, 3.21.9 and 3.22.4 carry the fixes, and github.com is already patched.
Two Sigma rules that spot a git merge-tree process killed by a memory fault in the Gitaly or Sidekiq logs.
Another out-of-band patch two days later, with no security fixes. They add database migrations and bring GitLab Orbit to 19.4 and 19.5, switched off by default.
Debian still marked its git packages vulnerable when we looked on November 16, and Ubuntu hadn't finished evaluating. Red Hat listed RHEL as affected with no fix out.
| Your GitLab line | Affected | Fixed in | Also check |
|---|---|---|---|
| 19.5 | Before 19.5.4 | 19.5.4 or later | 19.5.5 adds migrations, so plan downtime on a single node |
| 19.4 | Before 19.4.6 | 19.4.6 or later | 19.4.7 adds migrations too |
| 19.3 | Before 19.3.8 | 19.3.8 or later | Last line with security backports |
| 16.2 to 19.2 | All builds | No fix on these lines | Move up to a maintained line |
| Older than 16.2 | Not affected | Not applicable | Long out of support for other fixes |
| Compiled from source | Same as above | GitLab build above | Rebuild Gitaly's Git and the Git at git.bin_path |
| GitLab.com or Dedicated | No | Patched by GitLab | Nothing to do |
The 16.2 to 19.2 row is the one that catches people. GitLab normally backports security fixes to its three newest lines, which today are 19.5, 19.4 and 19.3, and this patch names no fix for anything older. A server that has sat on 18.x for a year is exposed and has no patch on its own line, so the fix is an upgrade across several versions, done along GitLab's upgrade path.
From the report to today
- Oct 5, 2026CVE number reserved; the bug came in through HackerOne
- Nov 10, 2026Git 2.56.1 and backports fix six flaws
- Nov 10, 2026GitLab 19.5.4, 19.4.6 and 19.3.8, plus a detection
- Nov 12, 2026GitLab 19.5.5 and 19.4.7, no security fixes
- Nov 16, 2026Not on CISA's KEV list; distro Git still unpatched
Debian, Ubuntu and Red Hat hadn't released fixed git packages when we checked. That matters if your self-compiled GitLab uses the distribution's Git.
- Gitaly compiles its own Git. You rerun the Update Gitaly steps to rebuild it
- There's often a second Git too, the one git.bin_path points at
- If that one comes from the OS, it needs 2.56.1 or a patched distro build
- Distro fixes weren't out yet, so building from Gitaly's branch is the quick route
- The patched Git comes inside the package
- Upgrading GitLab is the whole fix for this CVE
- Checking the GitLab version tells you whether you're exposed. Nothing else to chase
- Still check that every node in a cluster took the upgrade
What to do now
What to do now, by who you are
- Ask whether you run GitLab yourselves. If the team only uses GitLab.com, GitLab has already patched it.
- If you do run it, ask for the version on every server and the date it's being upgraded.
- Ask whether anyone outside the company can sign up. Contractors and partners count.
- Running GitHub Enterprise Server instead? Ask which build it's on, since GitHub has listed the fixed ones.
- Upgrade to 19.5.4, 19.4.6 or 19.3.8 or later. Servers on 19.2 or older need a planned upgrade path.
- On a source install, rebuild Gitaly's Git and the Git at git.bin_path from the matching Gitaly stable branch.
- Until you're patched, turn off open sign-up or require admin approval, and limit who can create projects.
- Check every Gitaly node took the new build. A cluster is only as patched as its oldest node.
- Update Git on build servers, runner hosts and images that merge or rebase branches from outside contributors.
- Update Git on developer laptops too. The recursive-clone flaw in the same release hits anyone who clones a hostile repo with submodules.
- Find CI/CD variables that hold cloud keys or deploy passwords, so you know what to rotate if a hunt finds something.
- Load GitLab's two Sigma rules, or run the log searches below, back to the day each server came online on an affected version.
- Make sure Gitaly and Sidekiq logs reach your SIEM. GitLab notes many installs don't ship them by default.
- Treat a hit as an attempt at code execution until shown otherwise. A clean result doesn't prove nothing happened.
Start with the version. On a Linux package install, gitlab-rake gitlab:env:info prints it. On a source install you also want the Git version that GitLab calls, which is the path set in git.bin_pathdefinitionThe setting in config/gitlab.yml on a source install that tells GitLab which Git program to call. in config/gitlab.yml. The commands below are examples, and the output values are made up.
sudo gitlab-rake gitlab:env:info | grep -i version # Linux package: prints the build you run GitLab information Version: 19.4.5-ee # 19.4.5 predates 19.4.6, so this box is still open. Upgrade it first grep -A2 '^ git:' /home/git/gitlab/config/gitlab.yml # source install: shows which Git GitLab calls bin_path: /usr/bin/git /usr/bin/git --version git version 2.47.3 # a distro Git that isn't patched yet. Build it from the Gitaly stable branch instead sudo zgrep -h 'merge-tree: signal: ' /var/log/gitlab/gitaly/* | grep -vE 'signal: (killed|term)' # Linux package log path. Anything left is a lead # nothing printed is good news. Any line here is worth a closer look
That last search is adapted from GitLab's detection notes. It looks for a git merge-tree process that died from a memory fault, which is what a failed attempt leaves behind. GitLab is plain about the limit: an attempt that works doesn't crash, so it doesn't show up. The same notes say the Sidekiq log carries a matching failed MergeRequestMergeabilityCheckWorker job, and the kernel log shows a segfault line for each crashed Git process.
Harden so the next one hurts less
The same Git release also fixes a stack corruption and an out-of-bounds read that crafted content can trigger. Patching fast is the main answer. The rest is about who can reach the server and how much an attacker gets once they're on Gitaly.
Durable fixes, each tied to this bug
- 01Close open sign-up
GitLab recommends turning off new accounts on public-facing servers that don't expect public users. If you need outside users, require admin approval. That setting skips LDAP and OmniAuth users, so GitLab says to set block_auto_created_users for those.
- 02Limit who can create projects
This bug needs a project the attacker controls. Set the Default projects limit to 0 so new accounts can't create personal projects, and set the minimum role for creating group projects. That second setting only applies to new groups, so check existing ones too.
- 03Keep GitLab off the open internet
Put self-managed GitLab behind a VPN or an identity-aware proxy, so only staff and runners can reach it.
- 04Ship the right logs
Send the Gitaly and Sidekiq logs to your SIEM, and the kernel log from Gitaly nodes if you can. Check which field holds the error text after ingestion.
- 05Keep secrets out of GitLab
CI jobs that fetch short-lived credentials from a vault through ID tokens leave far less on the server for anyone to take.
- 06Stay on a maintained line
Security backports normally reach only the three newest lines. Falling behind turns a quick patch into a multi-step upgrade on the worst possible day.
Before: a stranger signs up and opens a merge request. Gitaly does the rest
The server is on the internet with open sign-up. Any new account can create a project, and secrets sit in CI variables and in repositories.
After: patched, fenced and holding little worth stealing
Only staff reach GitLab, new accounts wait for approval, and Gitaly runs the fixed Git. Jobs get short-lived credentials from Vault, so the server stores few secrets.
If you find signs someone used this
If a detection fires on Gitaly, keep the evidence before you fix anything
The first two phases and the secret rotation follow GitLab's response steps; the cloud-key, rebuild and reporting steps are our additions. Save evidence before you change anything, because a restart can rotate logs away.
- 01Containfirst hour
- Block the account behind the merge request and revoke its tokens and SSH keys. Do it before anyone tidies up the project.
- Close the merge request so GitLab stops re-running the check, then lock the project so nobody else can reach it.
- Keep a copy of the bare repository before deleting anything. It's your evidence.
- Copy the Gitaly, Sidekiq, Rails and kernel logs for the window before any restart.
- 02Investigatefirst day
- Find who created the merge request in production_json.log or api_json.log, then trace that user and IP back.
- Look in the target branch for a .gitattributes file that sets conflict-marker-size very high.
- On the Gitaly node, check the git user's .ssh folder for an rc file or anything new, and look for stray files under the Gitaly data directory.
- Look for processes started by sshd as git that aren't gitlab-shell, new cron entries and outbound connections from the git user.
- 03Rotateif code ran
- Treat the instance and every repository on that Gitaly node as compromised. Code running there could reach all of them.
- Rotate the secrets in gitlab-secrets.json, CI/CD variables, runner tokens and access tokens.
- Rotate the cloud keys and database passwords those variables unlocked, not only the variables.
- 04Rebuildfirst days
- Stand up a clean server on a fixed build rather than cleaning the old one.
- Restore from a backup you trust, and compare repositories with developers' local copies for changes nobody made.
- 05Report and learnfirst week
- Bring in legal early. Customer contracts, regulators and your insurer may expect notice if code or data was taken.
- Write down how the account got in. Then shut that door for good, whether it was open sign-up, loose project creation or network access.
A clean kernel log doesn't clear the node, and neither does a clean SIEM. GitLab's detection only sees attempts that crashed. If the server was reachable by outsiders, unpatched and taking new sign-ups, decide on rotation based on that exposure, even with no hits.
What this could look like
Three typical setups
- the setup
- A small company runs GitLab 19.4.5 from the Linux package on one cloud VM. Sign-up is open so clients can file issues, and any account can create a project.
- what happens
- A stranger registers, creates a project, pushes two prepared branches and opens a merge request. The mergeability check runs Git on the same VM that holds all the code.
- what to do
- Upgrade to 19.4.6 or later today, turn on admin approval for new accounts and set the Default projects limit to 0 so new accounts can't create personal projects. Then run the log search for the days the server sat unpatched.
- the setup
- A mid-size company installed GitLab from source years ago and follows the update guide each month. Its config/gitlab.yml still points git.bin_path at the operating system's /usr/bin/git.
- what happens
- The team upgrades to 19.5.4 and rebuilds Gitaly. GitLab's notes warn that the Git at git.bin_path needs fixing as well, and the distribution hasn't published a patched package yet.
- what to do
- Build Git from the matching Gitaly stable branch with make git, point git.bin_path at it and restart. Check both Git versions before calling it done.
- the setup
- An enterprise runs GitLab 18.11 inside its network, reachable only on the VPN. Upgrades wait for a quarterly window, and a few hundred employees and contractors can create projects.
- what happens
- There's no patch for 18.11, so the server stays exposed to any insider or contractor account. A phished contractor login would be enough.
- what to do
- Restrict project creation now, ship Gitaly logs to the SIEM and bring the upgrade window forward. Plan the path through each required stop up to 19.5.4 or later.
The second case is the one we'd check first. A source install that follows GitLab's update guide can still leave the system Git in place, because GitLab's notes say both copies need the patch and the distribution packages weren't fixed yet.
How Cohash helps
The upgrade itself is quick on a Linux package install. Closing sign-up and getting Gitaly logs into a SIEM take a bit longer, and moving pipeline keys out of GitLab is the slow part. Our DevSecOps practice works on CI hardening, our Terraform and Vault people set up short-lived pipeline credentials, and our October GitLab CI regex post walks through the last round of GitLab fixes. If you want a second look at your exposure, start with an assessment.
What to take from this
- 01
A user who can create a project and open a merge request can reach this bug on self-managed GitLab. Open sign-up makes that anyone.
- 02
Upgrade to 19.5.4, 19.4.6 or 19.3.8 or later. Lines 16.2 to 19.2 have no backport and need a real upgrade.
- 03
Source installs have two copies of Git to fix: the one inside Gitaly and the one at git.bin_path.
- 04
Update Git on runners, build servers and laptops too. The same Git release fixes five other flaws.
- 05
GitLab's detection only sees attempts that crashed. Exposure, not a clean log, should drive the rotation decision.
01Am I affected by CVE-2026-105437 on GitLab?
You are if you run GitLab CE or EE yourself on any version from 16.2 before 19.3.8, 19.4 before 19.4.6 or 19.5 before 19.5.4. GitLab.com and GitLab Dedicated were patched before the advisory, so their customers have nothing to do.
02Which GitLab version should I upgrade to?
19.5.4, 19.4.6 or 19.3.8, or anything later on the same line. Those three have no new migrations. 19.5.5 and 19.4.7 came two days later with migrations and no extra security fixes, so a single-node server will need a short outage for them.
03We're on GitLab 18.11. Is there a patch?
No. GitLab normally backports security fixes only to its three newest lines, currently 19.5, 19.4 and 19.3. You need to upgrade along GitLab's upgrade path. Until then, limit who can sign up and create projects, and watch the Gitaly logs.
04Is upgrading GitLab enough if we compiled it from source?
Not on its own. GitLab says to rebuild the Git embedded in Gitaly with the Update Gitaly steps, and also the Git named in git.bin_path, built from the matching Gitaly stable branch. If that Git comes from your distribution, it needs 2.56.1 or a distro build patched for this CVE.
05Is this being exploited?
When we checked on November 16 it wasn't on CISA's Known Exploited Vulnerabilities list, and GitLab's notes don't report attacks. GitLab still rates it critical and published a detection for failed attempts, so patch now rather than waiting for that to change.
06Does this affect GitHub or plain Git?
It's a bug in Git itself, so any program that merges untrusted content with an unpatched Git can hit it. GitHub says github.com is fixed and GitHub Enterprise Server 3.19.15, 3.20.11, 3.21.9 and 3.22.4 carry the fix. For plain Git, update to 2.56.1 or the fixed build of your series.
07Can we block it without upgrading?
There are stopgaps. The CVE record suggests putting conflict-marker-size=7 for all files in each repository's info/attributes, or switching off server-side mergeability checks for untrusted repos. GitLab's own advice is to upgrade, and until you can, limit who can sign up and create projects.
Three questions, about a minute
Pick an answer and we'll tell you if it's right, and why it is or isn't. The score stays in this browser.
-
Q1You run GitLab 19.4.5 yourself, installed from the Linux package. What closes this hole?
show the answer
B. Move to 19.4.6 or later, since the package brings its own fixed Git The Linux package brings its own patched Git, so moving to 19.4.6 or later is the fix. The OS git package isn't what Gitaly uses on a package install.
-
Q2You compiled GitLab from source and upgraded to 19.5.4. What's still left?
show the answer
C. Rebuild Gitaly's Git and fix the Git at git.bin_path GitLab's notes say source installs must rebuild the Git embedded in Gitaly and also the Git named in git.bin_path, or upgrade a distro Git to 2.56.1 or a patched build.
-
Q3You run GitLab's Sigma rule over your Gitaly logs and it finds nothing. What have you actually learned?
show the answer
B. Only that no failed attempt crashed in the logs you kept The rule matches a git merge-tree process killed by a memory fault. GitLab says a working attempt doesn't crash, so a clean result only rules out failed tries.