Summary
borg extract might modify out-of-tree files when extracting maliciously crafted archives
Workarounds
For encrypted or authenticated repositories, do not share borg key and passphrase with potential attackers.
For all kinds of repositories, do not share repository access with potential attackers. Usually, the repository access is protected by means outside of borg; e.g. a ssh key for remote repositories or physical access to local storage media.
References
This issue was first discovered by AI in a private code security review initiated by @ThomasWaldmann.
A few days later, it was also independently reported to @ThomasWaldmann by:
- Michael Head (machin0r)
- Chinnapak Charoensiri [Github: Ziim-eiei].
Impact
A maliciously crafted archive could contain a symlink (e.g. "evil" -> "/etc") followed by an item below it ("evil/passwd"), or an item whose path embeds ".." (e.g. "a/../../etc/passwd").
When extracting such items, borg followed the symlink / resolved the "..", so it could delete or overwrite files outside the extraction directory.
In a quite similar scenario, a crafted archive could contain a slave hardlink item with the hardlink source pointing outside the extraction directory.
When extracting such an item, borg would hard-link the outside and the inside item.
Note: that sounds bad, but it is no big issue in practice: to create such a malicious archive, the attacker would need repository access and (for encrypted or authenticated repos) also the borg key and passphrase.
Affected: likely all borg releases before 1.4.5 (and also all borg 2.0.0 betas before b22).
Affected versions
Security releases
Kodem intelligence
Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.
Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.
Already deployed Kodem?
See it in your environmentNew to Kodem? Get a demo →Remediation advice
- 1.4.x release series: fix released with 1.4.5. commits 3e9ed6d1ad6d3531b39c07b8ef3ecf41fce4437f and 141888f2fabcd57a300547c2aa63212cb213924d.
- 1.2.x release series: no new releases any more, fix commits available on 1.2-maint branch: 0ac568e290518c3bbe781459978720dde7fab224 and d907f2cb57337041c4fa55ca4682895535e5076b
- 2.0.0 betas: fix will be in 2.0.0b22, fix commits on master branch: 2d632531028b09da8ab5d1450f89bebcc205d640 and 4f37fdfed10b50559a0dd333b0d5581c642af329
Frequently Asked Questions
- What is CVE-2026-62268? CVE-2026-62268 is a medium-severity security vulnerability in borgbackup (pip), affecting versions < 1.4.5. It is fixed in 1.4.5, 2.0.0b22.
- Which versions of borgbackup are affected by CVE-2026-62268? borgbackup (pip) versions < 1.4.5 is affected.
- Is there a fix for CVE-2026-62268? Yes. CVE-2026-62268 is fixed in 1.4.5, 2.0.0b22. Upgrade to this version or later.
- Is CVE-2026-62268 exploitable, and should I be worried? Whether CVE-2026-62268 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
- What actually determines whether CVE-2026-62268 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
- How do I fix CVE-2026-62268?
- Upgrade
borgbackupto 1.4.5 or later - Upgrade
borgbackupto 2.0.0b22 or later
- Upgrade