{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.1",
    "cveMetadata": {
        "state": "PUBLISHED",
        "cveId": "CVE-2022-31129",
        "assignerOrgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
        "assignerShortName": "GitHub_M",
        "dateUpdated": "2024-08-03T07:11:39.222Z",
        "dateReserved": "2022-05-18T00:00:00",
        "datePublished": "2022-07-06T00:00:00"
    },
    "containers": {
        "cna": {
            "title": "Inefficient Regular Expression Complexity in moment",
            "providerMetadata": {
                "orgId": "a0819718-46f1-4df5-94e2-005712e83aaa",
                "shortName": "GitHub_M",
                "dateUpdated": "2023-01-31T00:00:00"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "moment is a JavaScript date library for parsing, validating, manipulating, and formatting dates. Affected versions of moment were found to use an inefficient parsing algorithm. Specifically using string-to-date parsing in moment (more specifically rfc2822 parsing, which is tried by default) has quadratic (N^2) complexity on specific inputs. Users may notice a noticeable slowdown is observed with inputs above 10k characters. Users who pass user-provided strings without sanity length checks to moment constructor are vulnerable to (Re)DoS attacks. The problem is patched in 2.29.4, the patch can be applied to all affected versions with minimal tweaking. Users are advised to upgrade. Users unable to upgrade should consider limiting date lengths accepted from user input."
                }
            ],
            "affected": [
                {
                    "vendor": "moment",
                    "product": "moment",
                    "versions": [
                        {
                            "version": " >= 2.18.0, < 2.29.4",
                            "status": "affected"
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://github.com/moment/moment/security/advisories/GHSA-wc69-rhjr-hc9g"
                },
                {
                    "url": "https://github.com/moment/moment/pull/6015#issuecomment-1152961973"
                },
                {
                    "url": "https://github.com/moment/moment/commit/9a3b5894f3d5d602948ac8a02e4ee528a49ca3a3"
                },
                {
                    "url": "https://huntr.dev/bounties/f0952b67-f2ff-44a9-a9cd-99e0a87cb633/"
                },
                {
                    "name": "FEDORA-2022-85aa8e5706",
                    "tags": [
                        "vendor-advisory"
                    ],
                    "url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q/"
                },
                {
                    "name": "FEDORA-2022-35b698150c",
                    "tags": [
                        "vendor-advisory"
                    ],
                    "url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5/"
                },
                {
                    "name": "FEDORA-2022-b9ef7c3c3c",
                    "tags": [
                        "vendor-advisory"
                    ],
                    "url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IWY24RJA3SBJGA5N4CU4VBPHJPPPJL5O/"
                },
                {
                    "name": "FEDORA-2022-798fd95813",
                    "tags": [
                        "vendor-advisory"
                    ],
                    "url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZMX5YHELQVCGKKQVFXIYOTBMN23YYSRO/"
                },
                {
                    "url": "https://security.netapp.com/advisory/ntap-20221014-0003/"
                },
                {
                    "name": "[debian-lts-announce] 20230130 [SECURITY] [DLA 3295-1] node-moment security update",
                    "tags": [
                        "mailing-list"
                    ],
                    "url": "https://lists.debian.org/debian-lts-announce/2023/01/msg00035.html"
                }
            ],
            "metrics": [
                {
                    "cvssV3_1": {
                        "version": "3.1",
                        "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
                        "attackVector": "NETWORK",
                        "attackComplexity": "LOW",
                        "privilegesRequired": "NONE",
                        "userInteraction": "NONE",
                        "scope": "UNCHANGED",
                        "confidentialityImpact": "NONE",
                        "integrityImpact": "NONE",
                        "availabilityImpact": "HIGH",
                        "baseScore": 7.5,
                        "baseSeverity": "HIGH"
                    }
                }
            ],
            "problemTypes": [
                {
                    "descriptions": [
                        {
                            "type": "CWE",
                            "lang": "en",
                            "description": "CWE-400: Uncontrolled Resource Consumption",
                            "cweId": "CWE-400"
                        }
                    ]
                }
            ],
            "source": {
                "advisory": "GHSA-wc69-rhjr-hc9g",
                "discovery": "UNKNOWN"
            }
        },
        "adp": [
            {
                "providerMetadata": {
                    "orgId": "af854a3a-2127-422b-91ae-364da2661108",
                    "shortName": "CVE",
                    "dateUpdated": "2024-08-03T07:11:39.222Z"
                },
                "title": "CVE Program Container",
                "references": [
                    {
                        "url": "https://github.com/moment/moment/security/advisories/GHSA-wc69-rhjr-hc9g",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://github.com/moment/moment/pull/6015#issuecomment-1152961973",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://github.com/moment/moment/commit/9a3b5894f3d5d602948ac8a02e4ee528a49ca3a3",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "url": "https://huntr.dev/bounties/f0952b67-f2ff-44a9-a9cd-99e0a87cb633/",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "name": "FEDORA-2022-85aa8e5706",
                        "tags": [
                            "vendor-advisory",
                            "x_transferred"
                        ],
                        "url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q/"
                    },
                    {
                        "name": "FEDORA-2022-35b698150c",
                        "tags": [
                            "vendor-advisory",
                            "x_transferred"
                        ],
                        "url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5/"
                    },
                    {
                        "name": "FEDORA-2022-b9ef7c3c3c",
                        "tags": [
                            "vendor-advisory",
                            "x_transferred"
                        ],
                        "url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IWY24RJA3SBJGA5N4CU4VBPHJPPPJL5O/"
                    },
                    {
                        "name": "FEDORA-2022-798fd95813",
                        "tags": [
                            "vendor-advisory",
                            "x_transferred"
                        ],
                        "url": "https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZMX5YHELQVCGKKQVFXIYOTBMN23YYSRO/"
                    },
                    {
                        "url": "https://security.netapp.com/advisory/ntap-20221014-0003/",
                        "tags": [
                            "x_transferred"
                        ]
                    },
                    {
                        "name": "[debian-lts-announce] 20230130 [SECURITY] [DLA 3295-1] node-moment security update",
                        "tags": [
                            "mailing-list",
                            "x_transferred"
                        ],
                        "url": "https://lists.debian.org/debian-lts-announce/2023/01/msg00035.html"
                    }
                ]
            }
        ]
    }
}