hsec-2023-0011
Vulnerability from osv_haskell
git-annex GPG decryption attack via compromised remote
A malicious server for a special remote could trick git-annex into
decrypting a file that was encrypted to the user's GPG key. This
attack could be used to expose encrypted data that was never stored
in git-annex. Daniel Dent discovered this attack in collaboration
with Joey Hess.
To perform this attack the attacker needs control of a server
hosting an encrypted special remote used by the victim's
git-annex repository. The attacker uses git annex addurl
--relaxed with an innocuous URL, and waits for the user's
git-annex to download it, and upload an (encrypted) copy to the
special remote they also control. At some later point, when the
user downloads the content from the special remote, the attacker
instead sends them the content of the GPG-encrypted file that they
wish to have decrypted in its place (which may have been exfiltrated
from the victim's system via the attack described in
HSEC-2023-0010 / CVE-2018-10857, or acquired by other
means). Finally, the attacker drops their own copy of the original
innocuous URL, and waits for the victim git-annex to send them the
accidentially decrypted file.
The issue was fixed by making git-annex refuse to download
encrypted content from special remotes, unless it knows the hash of
the expected content. When the attacker provides some other
GPG-encrypted content, it will fail the hash check and be discarded.
{
"affected": [
{
"database_specific": {
"human_link": "https://github.com/haskell/security-advisories/tree/main/advisories/published/2023/HSEC-2023-0011.md",
"osv": "https://raw.githubusercontent.com/haskell/security-advisories/refs/heads/generated/osv-export/2023/HSEC-2023-0011.json"
},
"package": {
"ecosystem": "Hackage",
"name": "git-annex"
},
"ranges": [
{
"events": [
{
"introduced": "0.20110417"
},
{
"fixed": "6.20180626"
}
],
"type": "ECOSYSTEM"
}
],
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:N/A:N",
"type": "CVSS_V3"
}
]
}
],
"aliases": [
"CVE-2018-10859"
],
"database_specific": {
"home": "https://github.com/haskell/security-advisories",
"osvs": "https://raw.githubusercontent.com/haskell/security-advisories/refs/heads/generated/osv-export",
"repository": "https://github.com/haskell/security-advisories"
},
"details": "# *git-annex* GPG decryption attack via compromised remote\n\nA malicious server for a special remote could trick `git-annex` into\ndecrypting a file that was encrypted to the user\u0027s GPG key. This\nattack could be used to expose encrypted data that was never stored\nin *git-annex*. Daniel Dent discovered this attack in collaboration\nwith Joey Hess.\n\nTo perform this attack the attacker needs control of a server\nhosting an *encrypted* special remote used by the victim\u0027s\n*git-annex* repository. The attacker uses `git annex addurl\n--relaxed` with an innocuous URL, and waits for the user\u0027s\n`git-annex` to download it, and upload an (encrypted) copy to the\nspecial remote they also control. At some later point, when the\nuser downloads the content from the special remote, the attacker\ninstead sends them the content of the GPG-encrypted file that they\nwish to have decrypted in its place (which may have been exfiltrated\nfrom the victim\u0027s system via the attack described in\n**HSEC-2023-0010** / **CVE-2018-10857**, or acquired by other\nmeans). Finally, the attacker drops their own copy of the original\ninnocuous URL, and waits for the victim `git-annex` to send them the\naccidentially decrypted file.\n\nThe issue was fixed by making `git-annex` refuse to download\nencrypted content from special remotes, unless it knows the hash of\nthe expected content. When the attacker provides some other\nGPG-encrypted content, it will fail the hash check and be discarded.\n",
"id": "HSEC-2023-0011",
"modified": "2025-11-14T14:45:34Z",
"published": "2025-11-14T14:45:34Z",
"references": [
{
"type": "ADVISORY",
"url": "https://git-annex.branchable.com/security/CVE-2018-10857_and_CVE-2018-10859/"
}
],
"related": [
"HSEC-2023-0010",
"CVE-2018-10857"
],
"schema_version": "1.5.0",
"summary": "git-annex GPG decryption attack via compromised remote"
}
Sightings
| Author | Source | Type | Date |
|---|
Nomenclature
- Seen: The vulnerability was mentioned, discussed, or observed by the user.
- Confirmed: The vulnerability has been validated from an analyst's perspective.
- Published Proof of Concept: A public proof of concept is available for this vulnerability.
- Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
- Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
- Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
- Not confirmed: The user expressed doubt about the validity of the vulnerability.
- Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.