CVE-2022-31129 Inefficient Regular Expression Complexity in moment
비효율적인 정규 표현식 복잡성
설명
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.
moment는 파싱, 검증, 조작 및 서식 지정 날짜를 위한 JavaScript 날짜 라이브러리입니다. 영향을 받은 모멘트 버전은 비효율적인 구문 분석 알고리즘을 사용하는 것으로 밝혀졌습니다. 특히 순간적으로 문자열 대 날짜 파싱을 사용하여 (더 구체적으로 rfc2822 파싱, 이는 기본적으로 시도) 특정 입력에 이차 (N^2) 복잡성을 가지고. 사용자는 10k 문자 이상의 입력으로 눈에 띄는 둔화가 관찰된다는 것을 알 수 있습니다. 사용자가 제공한 문자열을 정상 길이로 전달하지 않고 순간 생성자를 확인하는 사용자는 (Re)DoS 공격에 취약합니다. 문제는 2.29.4에서 패치되며 패치는 최소한의 조정으로 영향을받는 모든 버전에 적용 할 수 있습니다. 사용자는 업그레이드하는 것이 좋습니다. 업그레이드할 수 없는 사용자는 사용자 입력에서 허용되는 날짜 길이 제한하는 것을 고려해야 합니다.
영향 받는 제품 제품 1개
-
해결 버전 있음
moment
moment
영향 받는 버전
- 2.18.0 이상 2.29.4 미만
해결 버전
- 2.29.4 이상
참고 자료 10건
- github.com https://github.com/moment/moment/commit/9a3b5894f3d5d602948ac8a02e4ee528a49ca3a3 (새 창)
- github.com https://github.com/moment/moment/pull/6015#issuecomment-1152961973 (새 창)
- github.com https://github.com/moment/moment/security/advisories/GHSA-wc69-rhjr-hc9g (새 창)
- huntr.dev https://huntr.dev/bounties/f0952b67-f2ff-44a9-a9cd-99e0a87cb633/ (새 창)
- lists.debian.org https://lists.debian.org/debian-lts-announce/2023/01/msg00035.html (새 창)
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/6QIO6YNLTK2T7SPKDS4JEL45FANLNC2Q/ (새 창)
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/IWY24RJA3SBJGA5N4CU4VBPHJPPPJL5O/ (새 창)
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ORJX2LF6KMPIHP6B2P6KZIVKMLE3LVJ5/ (새 창)
- lists.fedoraproject.org https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/ZMX5YHELQVCGKKQVFXIYOTBMN23YYSRO/ (새 창)
- security.netapp.com https://security.netapp.com/advisory/ntap-20221014-0003/ (새 창)