borgbackup
Affected
- introduced
0, fixed1.4.5(ecosystem)
Fixed versions
1.4.5
Fix
- Fixed version
1.4.5pip install --upgrade borgbackup==1.4.5
Advisory
Also known as: CVE-2026-62268
borg extract might modify out-of-tree files when extracting maliciously crafted archives
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
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:
Medium Basis: The source's own band: MODERATE
0, fixed 1.4.5 (ecosystem)1.4.5
1.4.5pip install --upgrade borgbackup==1.4.52.0.0b1, fixed 2.0.0b22 (ecosystem)2.0.0b22
2.0.0b22pip install --upgrade borgbackup==2.0.0b22Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.
Check your own computer: guard packages check
Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0