GHSA-8fjr-hghr-4m99

Suggest an improvement
Source
https://github.com/advisories/GHSA-8fjr-hghr-4m99
Import Source
https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2023/08/GHSA-8fjr-hghr-4m99/GHSA-8fjr-hghr-4m99.json
JSON Data
https://api.osv.dev/v1/vulns/GHSA-8fjr-hghr-4m99
Aliases
Published
2023-08-30T20:09:33Z
Modified
2024-02-16T08:22:31.481308Z
Severity
  • 4.7 (Medium) CVSS_V3 - CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N CVSS Calculator
Summary
Archive spoofing vulnerability in borgbackup
Details

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

  1. insert files (with no additional headers) into backups
  2. 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

https://github.com/borgbackup/borg/blob/1.2.6/docs/changes.rst#pre-125-archives-spoofing-vulnerability-cve-2023-36811

References

Affected packages

PyPI / borgbackup

Package

Affected ranges

Type
ECOSYSTEM
Events
Introduced
0Unknown introduced version / All previous versions are affected
Fixed
1.2.5

Affected versions

0.*

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.*

1.0.0rc1
1.0.0rc2
1.0.0
1.0.1
1.0.2
1.0.3
1.0.4
1.0.5
1.0.6rc1
1.0.6
1.0.7rc1
1.0.7rc2
1.0.7
1.0.8rc1
1.0.8
1.0.9rc1
1.0.9
1.0.10rc1
1.0.10
1.0.11rc1
1.0.11
1.0.12
1.0.13
1.1.0b1
1.1.0b2
1.1.0b3
1.1.0b4
1.1.0b5
1.1.0b6
1.1.0rc1
1.1.0rc2
1.1.0rc3
1.1.0rc4
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.0a2
1.2.0a3
1.2.0a4
1.2.0a5
1.2.0a6
1.2.0a7
1.2.0a8
1.2.0a9
1.2.0b1
1.2.0b2
1.2.0b3
1.2.0b4
1.2.0rc1
1.2.0
1.2.1
1.2.2
1.2.3
1.2.4