CVE-2023-36811: Borgbackup Archive Spoofing Vulnerability Vulnerability
MODERATECVE-2023-36811 is a MODERATE (CVSS 4.7) archive spoofing vulnerability vulnerability (CWE-347: Improper Verification of Cryptographic Signature) affecting Borgbackup libraries in the PyPI ecosystem. The issue involves archive spoofing vulnerability in borgbackup. Remediation is available by upgrading affected packages to version 1.2.5.
CVE-2023-36811 at a Glance
Security Impact
CVSS: 4.7
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N).
How to Fix CVE-2023-36811
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.
pip install borgbackup>=1.2.5
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-2023-36811, 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.2.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-347: Improper Verification of Cryptographic Signature, where the product does not verify, or incorrectly verifies, the cryptographic signature for data. 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
CVE-2023-36811 Affected Borgbackup Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
borgbackup
|
PyPI |
< 1.2.5
|
1.2.5
|
References
Frequently Asked Questions
What is CVE-2023-36811?
Which Borgbackup versions are affected?
What version fixes CVE-2023-36811?
Is borgbackup affected?
What is the CVSS score of CVE-2023-36811?
What CWE is associated with CVE-2023-36811?
How can I check PyPI dependencies for CVE-2023-36811?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-8fjr-hghr-4m99",
"modified" : "2024-09-13T14:35:53Z",
"published" : "2023-08-30T20:09:33Z",
"aliases" : [ "CVE-2023-36811" ],
"summary" : "Archive spoofing vulnerability in borgbackup",
"details" : "### Impact\nA flaw in the cryptographic authentication scheme in borgbackup allowed an attacker to fake archives and potentially indirectly cause backup data loss in the repository.\n\nThe attack requires an attacker to be able to\n\n1. insert files (with no additional headers) into backups\n2. gain write access to the repository\n\nThis vulnerability does not disclose plaintext to the attacker, nor does it affect the authenticity of existing archives.\n\nCreating plausible fake archives may be feasible for empty or small archives, but is unlikely for large archives.\n\nAffected are all borgbackup releases prior to 1.2.5.\n\nNote: CVSS scoring model seemed to badly fit for this case, thus I manually set score to \"moderate\".\n\n### Patches\nThe issue has been fixed in borgbackup 1.2.5.\nBut there was a bug in 1.2.5 upgrade instructions, thus 1.2.6 with an important fix in docs and code was released a day afterwards.\n\nAdditionally to installing the fixed code, users must follow the upgrade procedure as documented in the latest version of the change log.\n\n### Workarounds\nData loss after being attacked can be avoided by reviewing the archives (timestamp and contents valid and as expected) after any \"borg check --repair\" and before \"borg prune\".\n\n### References\n\nhttps://github.com/borgbackup/borg/blob/1.2.6/docs/changes.rst#pre-125-archives-spoofing-vulnerability-cve-2023-36811\n",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N"
}, {
"type" : "CVSS_V4",
"score" : "CVSS:4.0/AV:N/AC:L/AT:P/PR:L/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "borgbackup"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.2.5"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/borgbackup/borg/security/advisories/GHSA-8fjr-hghr-4m99"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-36811"
}, {
"type" : "WEB",
"url" : "https://github.com/borgbackup/borg/commit/3eb070191da10c2d3f7bc6484cf3d51c3045f884"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/borgbackup/borg"
}, {
"type" : "WEB",
"url" : "https://github.com/borgbackup/borg/blob/1.2.5-cvedocs/docs/changes.rst#pre-125-archives-spoofing-vulnerability-cve-2023-36811"
}, {
"type" : "WEB",
"url" : "https://github.com/borgbackup/borg/blob/1.2.6/docs/changes.rst#pre-125-archives-spoofing-vulnerability-cve-2023-36811"
}, {
"type" : "WEB",
"url" : "https://github.com/pypa/advisory-database/tree/main/vulns/borgbackup/PYSEC-2023-164.yaml"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/5Q3OHXERTU547SEQ3YREZXHOCYNLVD63"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/XOZDFIYEBIOKSIEAXUJJJFUJTAJ7TF3C"
}, {
"type" : "WEB",
"url" : "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/ZUCQSMAWOJBCRGF6XPKEZ2TPGAPNKIWV"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-347" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2023-08-30T20:09:33Z",
"nvd_published_at" : "2023-08-30T18:15:09Z"
}
}