BorgBackup CVE-2026-62268
MEDIUMAttack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessObtain repository access and borg key
-
DeliveryInject crafted symlink or '..' path archive
-
ExploitVictim runs borg extract
-
ExecutionBorg follows symlink or resolves '..'
-
ImpactOverwrite or delete out-of-tree files
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Symlink resolution safety
|
| Exploitation Conditions | Exploitation requires the attacker to have write access to the borg repository in order to inject a maliciously crafted archive, because 'borg create' never emits a child below a symlinked parent or a path containing '..' - the malicious items must be written directly into the repository, bypassing normal archive creation. For encrypted or authenticated repositories, the attacker additionally needs the borg encryption key and passphrase. The victim must then actively run 'borg extract' on the malicious archive for the symlink-following, '..'-resolution, or out-of-tree hardlinking to occur. These preconditions (privileged repository access plus key/passphrase, plus required victim action) are the primary limiting factors and sharply reduce realistic risk; no special non-default borg configuration is otherwise needed, and default extraction behavior in vulnerable versions is affected. |
| Impact | This is a genuine but low-urgency flaw whose real-world risk is heavily gated by prerequisites. No CVSS, EPSS, KEV, SSVC, or POC data is present in the input, so quantitative exploitation signals are entirely absent - this means the assessment rests on the description and CWE-59 (link following) rather than any scoring framework. The vulnerability (symlinked-parent following, '..' path traversal, and out-of-tree hardlinking during 'borg extract') can overwrite or delete files outside the extraction directory, including sensitive targets like /etc/passwd. Critically, however, the vendor advisory itself states exploitation requires repository access and, for encrypted or authenticated repositories, the borg encryption key and passphrase to craft the malicious archive - a very high bar that places this closer to an attacker-already-has-privileged-access scenario than a remotely weaponizable issue. There is no evidence of active exploitation and no public exploit; the issue was found proactively by an AI-assisted code review and independently reported by two researchers, not observed in attacks. Net: a legitimate integrity/availability bug worth patching, but not a drop-everything emergency absent the strong preconditions. |
| Exploit ScenarioDerived | An attacker who already holds write access to a borg repository (and the key/passphrase for encrypted repos) injects a crafted archive containing a symlink such as 'evil' -> '/etc' followed by 'evil/passwd', or an item with an embedded '..' path. When a victim later runs 'borg extract' on that archive, borg follows the symlink or resolves the '..' and overwrites or deletes files outside the intended extraction directory. No public exploit code is known; the proof of concept exists only as a vendor regression test that injects raw Item objects directly into a repository. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 15, 2026
Path traversal and symlink-following flaws in BorgBackup's borg extract let a specially crafted archive delete or overwrite files outside the chosen extraction directory - for example a symlink item "evil" -> "/etc" followed by an item path "evil/passwd", a path embedding "..", or a hardlink whose source points outside the tree. All releases before 1.4.5 and all 2.0.0 betas before b22 are affected, but exploitation is heavily gated: the attacker must already have privileged write access to the repository (per the assessed vector, CVSS:3.1/AV:L/AC:L/PR:H/UI:R/S:C/C:N/I:H/A:H) plus the borg key and passphrase for encrypted or authenticated repositories, and the victim must subsequently run borg extract on that archive, since borg create never emits such items. Vendor-released fixes are available in 1.4.5 and 2.0.0b22, and no public exploit code or confirmed active exploitation was identified at time of analysis.
RemediationAI
Vendor-released patch: upgrade to BorgBackup 1.4.5 for the 1.4.x series, or to 2.0.0b22 for deployments tracking the 2.0.0 betas; both releases contain the extraction-time parent-path validation (fix commits 3e9ed6d1ad6d3531b39c07b8ef3ecf41fce4437f and 141888f2fabcd57a300547c2aa63212cb213924d for 1.4.x, and 2d632531028b09da8ab5d1450f89bebcc205d640 and 4f37fdfed10b50559a0dd333b0d5581c642af329 for master), per the advisory at https://github.com/borgbackup/borg/security/advisories/GHSA-gfp8-w835-v44j. The 1.2.x series is end-of-life with no planned release, so operators pinned there must backport commits 0ac568e290518c3bbe781459978720dde7fab224 and d907f2cb57337041c4fa55ca4682895535e5076b from the 1.2-maint branch or migrate to 1.4.5. Because the flaw's prerequisite is repository write access, the effective compensating controls are access-oriented: do not grant repository access to untrusted principals and, for encrypted or authenticated repositories, never share the borg key or passphrase, since holding both is what allows an attacker to inject a malicious archive at all. Treat any archive whose provenance you do not control as untrusted - extracting it into a throwaway, unprivileged container or directory limits the blast radius, at the cost of losing the ability to restore directly onto the production filesystem. Note the behavioral side effect of the fix: patched versions refuse such items and abort with a warning/exit code indicating the skipped files, so an extraction that previously "succeeded" on a corrupted or malicious archive may now report warnings rather than silently writing outside the target directory.
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-59 (Improper Link Resolution Before File Access), and it lives in borg's extraction path rather than in its deduplication or encryption layers. Borg archives are sequences of Item records (symlinks, hardlinks, regular files, directories) whose stored paths are treated as relative to the extraction CWD. During extract_item, the vulnerable code performed the "remove existing file" step and the subsequent open()/mkdir()/symlink()/link() calls using the archive-supplied path directly, so an existing symlinked parent component was followed by the kernel and a parent component of ".." was resolved by the OS, escaping the extraction root; a slave hardlink item with a source outside the tree created an out-of-tree link. The upstream fix adds a new _check_safe_parent guard plus BackupSymlinkParentError and BackupPathTraversalError exception classes in src/borg/archive.py: parent components are split on os.sep, any ".." component is rejected up front, and each existing parent directory is verified with os.lstat (which does not follow symlinks) to be a real directory and cached in a safe_dirs set so each directory is stat'd only once per extraction. Both affected package identifiers are the PyPI distribution pip/borgbackup, i.e. borg deployed as a Python package rather than a distinct downstream product.
Know when the next one hits your stack
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
Attacker needs repository access plus key/passphrase (PR:H) and the victim must run extract (UI:R, AV:L); writing outside the extraction dir to OS files crosses authority (S:C) with integrity/availability impact.
DescriptionCVE.org
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).
Patches
- 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
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].
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
Attack Technique
Information disclosure occurs when an application unintentionally exposes sensitive data that aids attackers in reconnaissance or directly compromises security.
GHSA-gfp8-w835-v44j
CVE.org
Exploit-DB