{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.1",
    "cveMetadata": {
        "cveId": "CVE-2023-41040",
        "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "state": "PUBLISHED",
        "assignerShortName": "GitHub_M",
        "dateReserved": "2023-08-22T16:57:23.932Z",
        "datePublished": "2023-08-30T21:07:42.263Z",
        "dateUpdated": "2024-10-01T18:04:56.017Z"
    },
    "containers": {
        "cna": {
            "title": "GitPython blind local file inclusion",
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "cweId": "CWE-22",
                            "lang": "en",
                            "description": "CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')",
                            "type": "CWE"
                        }
                    ]
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "attackComplexity": "LOW",
                        "attackVector": "LOCAL",
                        "availabilityImpact": "LOW",
                        "baseScore": 4,
                        "baseSeverity": "MEDIUM",
                        "confidentialityImpact": "NONE",
                        "integrityImpact": "NONE",
                        "privilegesRequired": "NONE",
                        "scope": "UNCHANGED",
                        "userInteraction": "NONE",
                        "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L",
                        "version": "3.1"
                    }
                }
            ],
            "references": [
                {
                    "name": "https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-cwvm-v4w8-q58c",
                    "tags": [
                        "x_refsource_CONFIRM"
                    ],
                    "url": "https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-cwvm-v4w8-q58c"
                },
                {
                    "name": "https://github.com/gitpython-developers/GitPython/pull/1672",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/gitpython-developers/GitPython/pull/1672"
                },
                {
                    "name": "https://github.com/gitpython-developers/GitPython/commit/74e55ee4544867e1bd976b7df5a45869ee397b0b",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/gitpython-developers/GitPython/commit/74e55ee4544867e1bd976b7df5a45869ee397b0b"
                },
                {
                    "name": "https://github.com/gitpython-developers/GitPython/commit/e98f57b81f792f0f5e18d33ee658ae395f9aa3c4",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/gitpython-developers/GitPython/commit/e98f57b81f792f0f5e18d33ee658ae395f9aa3c4"
                },
                {
                    "name": "https://github.com/gitpython-developers/GitPython/blob/1c8310d7cae144f74a671cbe17e51f63a830adbf/git/refs/symbolic.py#L174-L175",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/gitpython-developers/GitPython/blob/1c8310d7cae144f74a671cbe17e51f63a830adbf/git/refs/symbolic.py#L174-L175"
                },
                {
                    "name": "https://github.com/gitpython-developers/GitPython/releases/tag/3.1.37",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/gitpython-developers/GitPython/releases/tag/3.1.37"
                },
                {
                    "name": "https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2023-165.yaml",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://github.com/pypa/advisory-database/tree/main/vulns/gitpython/PYSEC-2023-165.yaml"
                },
                {
                    "name": "https://lists.debian.org/debian-lts-announce/2023/09/msg00036.html",
                    "tags": [
                        "x_refsource_MISC"
                    ],
                    "url": "https://lists.debian.org/debian-lts-announce/2023/09/msg00036.html"
                }
            ],
            "affected": [
                {
                    "vendor": "gitpython-developers",
                    "product": "GitPython",
                    "versions": [
                        {
                            "version": "< 3.1.37",
                            "status": "affected"
                        }
                    ]
                }
            ],
            "providerMetadata": {
                "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
                "shortName": "GitHub_M",
                "dateUpdated": "2024-09-20T20:06:25.383Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "GitPython is a python library used to interact with Git repositories. In order to resolve some git references, GitPython reads files from the `.git` directory, in some places the name of the file being read is provided by the user, GitPython doesn't check if this file is located outside the `.git` directory. This allows an attacker to make GitPython read any file from the system. This vulnerability is present in https://github.com/gitpython-developers/GitPython/blob/1c8310d7cae144f74a671cbe17e51f63a830adbf/git/refs/symbolic.py#L174-L175. That code joins the base directory with a user given string without checking if the final path is located outside the base directory. This vulnerability cannot be used to read the contents of files but could in theory be used to trigger a denial of service for the program. This issue has been addressed in version 3.1.37."
                }
            ],
            "source": {
                "advisory": "GHSA-cwvm-v4w8-q58c",
                "discovery": "UNKNOWN"
            }
        },
        "adp": [
            {
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2024-08-02T18:46:11.452Z"
                },
                "title": "CVE Program Container",
                "references": [
                    {
                        "name": "https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-cwvm-v4w8-q58c",
                        "tags": [
                            "x_refsource_CONFIRM",
                            "x_transferred"
                        ],
                        "url": "https://github.com/gitpython-developers/GitPython/security/advisories/GHSA-cwvm-v4w8-q58c"
                    },
                    {
                        "name": "https://github.com/gitpython-developers/GitPython/blob/1c8310d7cae144f74a671cbe17e51f63a830adbf/git/refs/symbolic.py#L174-L175",
                        "tags": [
                            "x_refsource_MISC",
                            "x_transferred"
                        ],
                        "url": "https://github.com/gitpython-developers/GitPython/blob/1c8310d7cae144f74a671cbe17e51f63a830adbf/git/refs/symbolic.py#L174-L175"
                    },
                    {
                        "url": "https://lists.debian.org/debian-lts-announce/2023/09/msg00036.html",
                        "tags": [
                            "x_transferred"
                        ]
                    }
                ]
            },
            {
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "timestamp": "2024-10-01T18:04:46.833039Z",
                                "id": "CVE-2023-41040",
                                "options": [
                                    {
                                        "Exploitation": "poc"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "partial"
                                    }
                                ],
                                "role": "CISA Coordinator",
                                "version": "2.0.3"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2024-10-01T18:04:56.017Z"
                }
            }
        ]
    }
}