4.7medium
Archive spoofing vulnerability in borgbackup
- Severity
- 4.7medium CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.11% (higher than 1% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-8fjr-hghr-4m99PYSEC-2023-164
Description
borgbackup is an opensource, deduplicating archiver with compression and authenticated encryption. 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 and 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. The issue has been fixed in borgbackup 1.2.5. Users are advised to upgrade. Additionally to installing the fixed code, users must follow the upgrade procedure as documented in the change log. 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". There are no known workarounds for this vulnerability.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| borgbackup borg | < 1.2.5, before 1.2.5 | CVE List, NVD |
| borgbackup (PyPI) | before 1.2.5, before 3eb070191da10c2d3f7bc6484cf3d51c3045f884 | GitHub Advisory Database, PyPA Advisory Database |
All scores
| GitHub_M | 4.7medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N |
| GitHub | 4.7medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N |
| GitHub | medium CVSS:4.0 | 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 |
| NVD | 4.7medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N |
| PyPA Advisory Database | 4.7medium CVSS:3.1 | CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:H/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
borgbackup is an opensource, deduplicating archiver with compression and authenticated encryption. 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 and 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. The issue has been fixed in borgbackup 1.2.5. Users are advised to upgrade. Additionally to installing the fixed code, users must follow the upgrade procedure as documented in the change log. 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". There are no known workarounds for this vulnerability.
GitHub Advisory Database
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
NVD (es)
borgbackup es un archivador de duplicación de código abierto con compresión y cifrado autenticado. Una falla en el esquema de autenticación criptográfica en borgbackup permitió a un atacante falsificar archivos y potencialmente causar indirectamente la pérdida de datos de los respaldo en el repositorio. El ataque requiere que un atacante pueda: 1. insertar archivos (sin encabezados adicionales) en las copias de seguridad y 2. obtener acceso de escritura al repositorio. Esta vulnerabilidad no revela texto sin formato al atacante ni afecta la autenticidad de los archivos existentes. La creación de archivos falsos plausibles puede ser factible para archivos vacíos o pequeños, pero es poco probable para archivos grandes. El problema se solucionó en borgbackup 1.2.5. Se recomienda a los usuarios que actualicen. Además de instalar el código fijo, los usuarios deben seguir el procedimiento de actualización como se documenta en el registro de cambios. La pérdida de datos después de un ataque se puede evitar revisando los archivos (marca de tiempo y contenido válidos y esperados) después de cualquier "borg check --repair" y antes de "borg prune". No se conocen workarounds para esta vulnerabilidad.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-36811 changed 2025-02-13 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-8fjr-hghr-4m99 changed 2024-09-13 | CC-BY-4.0 |
| NVD | CVE-2023-36811 changed 2026-06-17 | Public domain |
| PyPA Advisory Database | PYSEC-2023-164 changed 2023-11-08 | CC-BY-4.0 |