{"id":"CVE-2022-39253","published":"2022-10-19T00:00:00Z","modified":"2024-08-03T12:00:43Z","title":"Git subject to exposure of sensitive information via local clone of symbolic links","vendor":"git","product":"git","tier":"tail","description":{"text":"Git is an open source, scalable, distributed revision control system. Versions prior to 2.30.6, 2.31.5, 2.32.4, 2.33.5, 2.34.5, 2.35.5, 2.36.3, and 2.37.4 are subject to exposure of sensitive information to a malicious actor. When performing a local clone (where the source and target of the clone are on the same volume), Git copies the contents of the source's `$GIT_DIR/objects` directory into the destination by either creating hardlinks to the source contents, or copying them (if hardlinks are disabled via `--no-hardlinks`). A malicious actor could convince a victim to clone a repository with a symbolic link pointing at sensitive information on the victim's machine. This can be done either by having the victim clone a malicious repository on the same machine, or having them clone a malicious repository embedded as a bare repository via a submodule from any source, provided they clone with the `--recurse-submodules` option. Git does not create symbolic links in the `$GIT_DIR/objects` directory. The problem has been patched in the versions published on 2022-10-18, and backported to v2.30.x. Potential workarounds: Avoid cloning untrusted repositories using the `--local` optimization when on a shared machine, either by passing the `--no-local` option to `git clone` or cloning from a URL that uses the `file://` scheme. Alternatively, avoid cloning repositories from untrusted sources with `--recurse-submodules` or run `git config --global protocol.file.allow user`.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.5,"severity":"MEDIUM","version":"3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:N/A:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.01481,"percentile":0.73841,"provenance":"source"},"cwes":[{"id":"CWE-200","name":"Exposure of Sensitive Information to an Unauthorized Actor"}],"references":[{"url":"https://github.com/git/git/security/advisories/GHSA-3wp6-j8xr-qw85","tags":[]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/VFYXCTLOSESYIP72BUYD6ECDIMUM4WMB/","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/UKFHE4KVD7EKS5J3KTDFVBEKU3CLXGVV/","tags":["vendor-advisory"]},{"url":"https://support.apple.com/kb/HT213496","tags":[]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/OHNO2FB55CPX47BAXMBWUBGWHO6N6ZZH/","tags":["vendor-advisory"]},{"url":"http://seclists.org/fulldisclosure/2022/Nov/1","tags":["mailing-list"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/JMQWGMDLX6KTVWW5JZLVPI7ICAK72TN7/","tags":["vendor-advisory"]},{"url":"https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/C7B6JPKX5CGGLAHXJVQMIZNNEEB72FHD/","tags":["vendor-advisory"]},{"url":"https://lists.debian.org/debian-lts-announce/2022/12/msg00025.html","tags":["mailing-list"]},{"url":"http://www.openwall.com/lists/oss-security/2023/02/14/5","tags":["mailing-list"]},{"url":"https://security.gentoo.org/glsa/202312-15","tags":["vendor-advisory"]},{"url":"http://www.openwall.com/lists/oss-security/2024/05/14/2","tags":["mailing-list"]}],"priority":{"score":23.6,"factors":[{"name":"EPSS percentile","points":14.77},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":3.85}]},"exploitSources":{"pocGithub":{"count":2,"skipped":0,"earliest":"2022-12-20","earliestUrl":"https://github.com/ssst0n3/docker-cve-2022-39253-poc","repos":[{"name":"ssst0n3/docker-cve-2022-39253-poc","url":"https://github.com/ssst0n3/docker-cve-2022-39253-poc","stars":10,"created":"2022-12-20"},{"name":"HiImDarwin/NetworkSecurityFinalProject","url":"https://github.com/HiImDarwin/NetworkSecurityFinalProject","stars":0,"created":"2023-05-15"}]},"first":{"date":"2022-12-20","source":"PoC-in-GitHub","url":"https://github.com/ssst0n3/docker-cve-2022-39253-poc"},"provenance":"source"},"vendorSlug":"git","affectedVersions":[{"vendor":"git","product":"git","versions":["< 2.30.6","< 2.31.5","< 2.32.4","< 2.33.5","< 2.34.5","< 2.35.5","< 2.36.3","< 2.37.4"]}],"euvd":{"id":"EUVD-2022-41767","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-git-cve-2022-39253","children":[{"from":"CVE-2022-39253","to":"CVE-2024-32021","relation":"incomplete-fix","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"incomplete-fix","quote":"While the code includes checks against symbolic links in the source repository, which were added during the fix for CVE-2022-39253, these checks can still be raced because the hard link operation ultimately follows symlinks.","from":"CVE.org","in":"CVE-2024-32021"}]}]}}