{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.1",
    "cveMetadata": {
        "state": "PUBLISHED",
        "cveId": "CVE-2022-1537",
        "assignerOrgId": "c09c270a-b464-47c1-9133-acb35b22c19a",
        "assignerShortName": "@huntrdev",
        "dateUpdated": "2024-08-03T00:10:03.294Z",
        "dateReserved": "2022-04-29T00:00:00",
        "datePublished": "2022-05-10T00:00:00"
    },
    "containers": {
        "cna": {
            "title": "file.copy operations in GruntJS are vulnerable to a TOCTOU race condition leading to arbitrary file write in gruntjs/grunt",
            "providerMetadata": {
                "orgId": "c09c270a-b464-47c1-9133-acb35b22c19a",
                "shortName": "@huntrdev",
                "dateUpdated": "2023-04-05T00:00:00"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "file.copy operations in GruntJS are vulnerable to a TOCTOU race condition leading to arbitrary file write in GitHub repository gruntjs/grunt prior to 1.5.3. This vulnerability is capable of arbitrary file writes which can lead to local privilege escalation to the GruntJS user if a lower-privileged user has write access to both source and destination directories as the lower-privileged user can create a symlink to the GruntJS user's .bashrc file or replace /etc/shadow file if the GruntJS user is root."
                }
            ],
            "affected": [
                {
                    "vendor": "gruntjs",
                    "product": "gruntjs/grunt",
                    "versions": [
                        {
                            "version": "unspecified",
                            "lessThan": "1.5.3",
                            "status": "affected",
                            "versionType": "custom"
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://huntr.dev/bounties/0179c3e5-bc02-4fc9-8491-a1a319b51b4d"
                },
                {
                    "url": "https://github.com/gruntjs/grunt/commit/58016ffac5ed9338b63ecc2a63710f5027362bae"
                },
                {
                    "name": "[debian-lts-announce] 20230405 [SECURITY] [DLA 3383-1] grunt security update",
                    "tags": [
                        "mailing-list"
                    ],
                    "url": "https://lists.debian.org/debian-lts-announce/2023/04/msg00006.html"
                }
            ],
            "metrics": [
                {
                    "cvssV3_0": {
                        "version": "3.0",
                        "vectorString": "CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
                        "attackVector": "LOCAL",
                        "attackComplexity": "LOW",
                        "privilegesRequired": "LOW",
                        "userInteraction": "NONE",
                        "scope": "UNCHANGED",
                        "confidentialityImpact": "HIGH",
                        "integrityImpact": "HIGH",
                        "availabilityImpact": "HIGH",
                        "baseScore": 7.8,
                        "baseSeverity": "HIGH"
                    }
                }
            ],
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "type": "CWE",
                            "lang": "en",
                            "description": "CWE-367 Time-of-check Time-of-use (TOCTOU) Race Condition",
                            "cweId": "CWE-367"
                        }
                    ]
                }
            ],
            "source": {
                "advisory": "0179c3e5-bc02-4fc9-8491-a1a319b51b4d",
                "discovery": "EXTERNAL"
            }
        },
        "adp": [
            {
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2024-08-03T00:10:03.294Z"
                },
                "title": "CVE Program Container",
                "references": [
                    {
                        "url": "https://huntr.dev/bounties/0179c3e5-bc02-4fc9-8491-a1a319b51b4d",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://github.com/gruntjs/grunt/commit/58016ffac5ed9338b63ecc2a63710f5027362bae",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "name": "[debian-lts-announce] 20230405 [SECURITY] [DLA 3383-1] grunt security update",
                        "tags": [
                            "mailing-list",
                            "x_transferred"
                        ],
                        "url": "https://lists.debian.org/debian-lts-announce/2023/04/msg00006.html"
                    }
                ]
            }
        ]
    }
}