Ecosyste.ms: Advisories
An open API service providing security vulnerability metadata for many open source software ecosystems.
Security Advisories: GSA_kwCzR0hTQS04ZmpyLWhnaHItNG05Oc4AA1lJ
Archive spoofing vulnerability in borgbackup
Impact
A flaw in the cryptographic authentication scheme in borgbackup allowed an attacker to fake archives and potentially indirectly cause backup data loss in the repository.
The attack requires an attacker to be able to
- insert files (with no additional headers) into backups
- gain write access to the repository
This vulnerability does not disclose plaintext to the attacker, nor does it affect the authenticity of existing archives.
Creating plausible fake archives may be feasible for empty or small archives, but is unlikely for large archives.
Affected are all borgbackup releases prior to 1.2.5.
Note: CVSS scoring model seemed to badly fit for this case, thus I manually set score to "moderate".
Patches
The issue has been fixed in borgbackup 1.2.5.
But 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.
Additionally to installing the fixed code, users must follow the upgrade procedure as documented in the latest version of the change log.
Workarounds
Data 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".
References Permalink: https://github.com/advisories/GHSA-8fjr-hghr-4m99
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS04ZmpyLWhnaHItNG05Oc4AA1lJ
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: 9 months ago
Updated: 6 months ago
CVSS Score: 4.7
CVSS vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N
Identifiers: GHSA-8fjr-hghr-4m99, CVE-2023-36811
References:
- https://github.com/borgbackup/borg/security/advisories/GHSA-8fjr-hghr-4m99
- https://nvd.nist.gov/vuln/detail/CVE-2023-36811
- https://github.com/borgbackup/borg/commit/3eb070191da10c2d3f7bc6484cf3d51c3045f884
- https://github.com/borgbackup/borg/blob/1.2.5-cvedocs/docs/changes.rst#pre-125-archives-spoofing-vulnerability-cve-2023-36811
- https://github.com/borgbackup/borg/blob/1.2.6/docs/changes.rst#pre-125-archives-spoofing-vulnerability-cve-2023-36811
- https://github.com/pypa/advisory-database/tree/main/vulns/borgbackup/PYSEC-2023-164.yaml
- https://lists.fedoraproject.org/archives/list/[email protected]/message/5Q3OHXERTU547SEQ3YREZXHOCYNLVD63/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/ZUCQSMAWOJBCRGF6XPKEZ2TPGAPNKIWV/
- https://lists.fedoraproject.org/archives/list/[email protected]/message/XOZDFIYEBIOKSIEAXUJJJFUJTAJ7TF3C/
- https://github.com/advisories/GHSA-8fjr-hghr-4m99
Blast Radius: 9.0
Affected Packages
pypi:borgbackup
Dependent packages: 3Dependent repositories: 83
Downloads: 13,700 last month
Affected Version Ranges: < 1.2.5
Fixed in: 1.2.5
All affected versions: 0.23.0, 0.24.0, 0.25.0, 0.26.0, 0.26.1, 0.27.0, 0.28.0, 0.28.1, 0.28.2, 0.29.0, 0.30.0, 0.30.1, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9, 1.0.10, 1.0.11, 1.0.12, 1.0.13, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.1.7, 1.1.8, 1.1.9, 1.1.10, 1.1.11, 1.1.12, 1.1.13, 1.1.14, 1.1.15, 1.1.16, 1.1.17, 1.1.18, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4
All unaffected versions: 1.2.5, 1.2.6, 1.2.7, 1.2.8