{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.1",
    "cveMetadata": {
        "cveId": "CVE-2024-7348",
        "assignerOrgId": "f86ef6dc-4d3a-42ad-8f28-e6d5547a5007",
        "state": "PUBLISHED",
        "assignerShortName": "PostgreSQL",
        "dateReserved": "2024-07-31T18:33:23.341Z",
        "datePublished": "2024-08-08T13:00:02.130Z",
        "dateUpdated": "2024-08-22T18:03:18.699Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "f86ef6dc-4d3a-42ad-8f28-e6d5547a5007",
                "shortName": "PostgreSQL",
                "dateUpdated": "2024-08-08T13:00:02.130Z"
            },
            "title": "PostgreSQL relation replacement during pg_dump executes arbitrary SQL",
            "descriptions": [
                {
                    "lang": "en",
                    "value": "Time-of-check Time-of-use (TOCTOU) race condition in pg_dump in PostgreSQL allows an object creator to execute arbitrary SQL functions as the user running pg_dump, which is often a superuser. The attack involves replacing another relation type with a view or foreign table. The attack requires waiting for pg_dump to start, but winning the race condition is trivial if the attacker retains an open transaction. Versions before PostgreSQL 16.4, 15.8, 14.13, 13.16, and 12.20 are affected."
                }
            ],
            "affected": [
                {
                    "defaultStatus": "unaffected",
                    "product": "PostgreSQL",
                    "vendor": "n/a",
                    "versions": [
                        {
                            "lessThan": "16.4",
                            "status": "affected",
                            "version": "16",
                            "versionType": "rpm"
                        },
                        {
                            "lessThan": "15.8",
                            "status": "affected",
                            "version": "15",
                            "versionType": "rpm"
                        },
                        {
                            "lessThan": "14.13",
                            "status": "affected",
                            "version": "14",
                            "versionType": "rpm"
                        },
                        {
                            "lessThan": "13.16",
                            "status": "affected",
                            "version": "13",
                            "versionType": "rpm"
                        },
                        {
                            "lessThan": "12.20",
                            "status": "affected",
                            "version": "0",
                            "versionType": "rpm"
                        }
                    ]
                }
            ],
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "lang": "en",
                            "cweId": "CWE-367",
                            "type": "CWE",
                            "description": "Time-of-check Time-of-use (TOCTOU) Race Condition"
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://www.postgresql.org/support/security/CVE-2024-7348/"
                }
            ],
            "metrics": [
                {
                    "format": "CVSS",
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "baseScore": 8.8,
                        "baseSeverity": "HIGH"
                    }
                }
            ],
            "configurations": [
                {
                    "lang": "en",
                    "value": "attacker has permission to create non-temporary objects in at least one schema"
                }
            ],
            "credits": [
                {
                    "lang": "en",
                    "value": "The PostgreSQL project thanks Noah Misch for reporting this problem."
                }
            ]
        },
        "adp": [
            {
                "affected": [
                    {
                        "vendor": "postgresql",
                        "product": "postgresql",
                        "cpes": [
                            "cpe:2.3:a:postgresql:postgresql:*:*:*:*:*:*:*:*"
                        ],
                        "defaultStatus": "unknown",
                        "versions": [
                            {
                                "version": "0",
                                "status": "affected",
                                "lessThan": "12.20",
                                "versionType": "custom"
                            },
                            {
                                "version": "13",
                                "status": "affected",
                                "lessThan": "13.16",
                                "versionType": "custom"
                            },
                            {
                                "version": "14",
                                "status": "affected",
                                "lessThan": "14.13",
                                "versionType": "custom"
                            },
                            {
                                "version": "15",
                                "status": "affected",
                                "lessThan": "15.8",
                                "versionType": "custom"
                            },
                            {
                                "version": "16",
                                "status": "affected",
                                "lessThan": "16.4",
                                "versionType": "custom"
                            }
                        ]
                    }
                ],
                "metrics": [
                    {
                        "other": {
                            "type": "ssvc",
                            "content": {
                                "timestamp": "2024-08-15T00:00:00+00:00",
                                "options": [
                                    {
                                        "Exploitation": "none"
                                    },
                                    {
                                        "Automatable": "no"
                                    },
                                    {
                                        "Technical Impact": "total"
                                    }
                                ],
                                "role": "CISA Coordinator",
                                "version": "2.0.3",
                                "id": "CVE-2024-7348"
                            }
                        }
                    }
                ],
                "title": "CISA ADP Vulnrichment",
                "providerMetadata": {
                    "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
                    "shortName": "CISA-ADP",
                    "dateUpdated": "2024-08-16T04:01:38.124Z"
                }
            },
            {
                "title": "CVE Program Container",
                "references": [
                    {
                        "url": "http://www.openwall.com/lists/oss-security/2024/08/11/1"
                    },
                    {
                        "url": "https://security.netapp.com/advisory/ntap-20240822-0002/"
                    }
                ],
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2024-08-22T18:03:18.699Z"
                }
            }
        ]
    }
}