Vulnerabilities in pkg:pypi/borgbackup

PACKAGE
Advisory Identifier: GHSA-gfp8-w835-v44j
Advisory Summary

CVE-2026-62268 is a MODERATE borg extract might modify out-of-tree vulnerability (CWE-59: Improper Link Resolution Before File Access ('Link Following')) affecting Borgbackup libraries in the PyPI ecosystem. The issue involves borg extract might modify out-of-tree files when extracting maliciously crafted archives. Remediation is available by upgrading affected packages to version 1.4.5, 2.0.0b22.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/borgbackup

3 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/borgbackup. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-gfp8-w835-v44j CVE-2026-62268 MODERATE borg extract might modify out-of-tree files when extracting maliciously crafted archives
GHSA-8fjr-hghr-4m99 CVE-2023-36811 MODERATE Archive spoofing vulnerability in borgbackup
GHSA-8q8v-28rm-qw4w CVE-2017-15914 HIGH Borg Improper Access Control vulnerability

CVE-2026-62268 at a Glance

CVE Identifier CVE-2026-62268
GHSA Identifier GHSA-gfp8-w835-v44j
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-59: Improper Link Resolution Before File Access ('Link Following')
Affected Product Borgbackup
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2026-62268

To remediate this vulnerability, upgrade all affected Borgbackup dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

borgbackup fixed: 1.4.5
pip install borgbackup>=1.4.5
borgbackup fixed: 2.0.0b22
pip install borgbackup>=2.0.0b22
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show borgbackup

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-62268, inspect your installed packages using pip:

pip show borgbackup

Analyze the terminal output to locate any version of Borgbackup in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.5), your application is affected.

Note: The pip show borgbackup command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following'), where the product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource. In Borgbackup, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### 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].

CVE-2026-62268 Affected Borgbackup Versions

2 component(s)
Fixed Versions:
1.4.52.0.0b22
Product / Package Ecosystem Affected Versions Fixed Version
borgbackup
PyPI
< 1.4.5
1.4.5
borgbackup
PyPI
≥ 2.0.0b1
< 2.0.0b22
2.0.0b22

References

Frequently Asked Questions

What is CVE-2026-62268?
CVE-2026-62268 is a security vulnerability in Borgbackup involving borg extract might modify out-of-tree files when extracting maliciously crafted archives under CWE-59: Improper Link Resolution Before File Access ('Link Following').
Which Borgbackup versions are affected?
Affected versions include releases prior to 1.4.5, 2.0.0b22 across affected packages: borgbackup.
What version fixes CVE-2026-62268?
Upgrading to 1.4.5, 2.0.0b22 (or the latest patched release for your respective branch) resolves the vulnerability.
Is borgbackup affected?
Yes, borgbackup is affected in releases prior to 1.4.5, 2.0.0b22. Upgrade your dependency to 1.4.5, 2.0.0b22 or later.
What CWE is associated with CVE-2026-62268?
CVE-2026-62268 is classified under CWE-59: Improper Link Resolution Before File Access ('Link Following') (The product attempts to access a file based on the filename, but it does not properly prevent that filename from identifying a link or shortcut that resolves to an unintended resource.).
How can I check PyPI dependencies for CVE-2026-62268?
Run the dependency tree command: 'pip show borgbackup'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-gfp8-w835-v44j",
  "modified" : "2026-10-15T20:09:23Z",
  "published" : "2026-10-15T20:09:23Z",
  "aliases" : [ "CVE-2026-62268" ],
  "summary" : "borg extract might modify out-of-tree files when extracting maliciously crafted archives",
  "details" : "### Impact\n\nA 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\").\n\nWhen extracting such items, borg followed the symlink / resolved the \"..\", so it could delete or overwrite files outside the extraction directory.\n\nIn a quite similar scenario, a crafted archive could contain a slave hardlink item with the hardlink source pointing outside the extraction directory.\n\nWhen extracting such an item, borg would hard-link the outside and the inside item.\n    \nNote: 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.\n\nAffected: likely all borg releases before 1.4.5 (and also all borg 2.0.0 betas before b22).\n\n### Patches\n- 1.4.x release series: fix released with 1.4.5. commits 3e9ed6d1ad6d3531b39c07b8ef3ecf41fce4437f and 141888f2fabcd57a300547c2aa63212cb213924d.\n- 1.2.x release series: no new releases any more, fix commits available on 1.2-maint branch: 0ac568e290518c3bbe781459978720dde7fab224 and d907f2cb57337041c4fa55ca4682895535e5076b\n- 2.0.0 betas: fix will be in 2.0.0b22, fix commits on master branch: 2d632531028b09da8ab5d1450f89bebcc205d640 and 4f37fdfed10b50559a0dd333b0d5581c642af329\n\n### Workarounds\nFor encrypted or authenticated repositories, do not share borg key and passphrase with potential attackers.\n\nFor 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.\n\n### References\nThis issue was first discovered by AI in a private code security review initiated by @ThomasWaldmann.\n\nA few days later, it was also independently reported to @ThomasWaldmann by:\n- Michael Head (machin0r)\n- Chinnapak Charoensiri [Github: Ziim-eiei].",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:L/AC:L/AT:P/PR:H/UI:A/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "borgbackup"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.4.5"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "borgbackup"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "2.0.0b1"
      }, {
        "fixed" : "2.0.0b22"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/borgbackup/borg/security/advisories/GHSA-gfp8-w835-v44j"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/borgbackup/borg/commit/0ac568e290518c3bbe781459978720dde7fab224"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/borgbackup/borg/commit/141888f2fabcd57a300547c2aa63212cb213924d"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/borgbackup/borg/commit/2d632531028b09da8ab5d1450f89bebcc205d640"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/borgbackup/borg/commit/3e9ed6d1ad6d3531b39c07b8ef3ecf41fce4437f"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/borgbackup/borg/commit/4f37fdfed10b50559a0dd333b0d5581c642af329"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/borgbackup/borg/commit/d907f2cb57337041c4fa55ca4682895535e5076b"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/borgbackup/borg"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/borgbackup/borg/releases/tag/1.4.5"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/borgbackup/borg/releases/tag/2.0.0b22"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-59" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-10-15T20:09:23Z",
    "nvd_published_at" : null
  }
}