🇰🇷 한글 설명
toml-node 5.0.1 미만 버전의 toml.parse() 컴파일러 내 addTableArray() 함수에서 발생하는 취약점입니다. 배열-테이블 헤더를 처리할 때 중복된 경로를 제거하지 않고 전체 데이터 세트를 반복해서 재검사하여, 대량의 헤더가 포함된 문서 처리 시 기하급수적인 연산 부하를 발생시킵니다. 이로 인해 Node.js 이벤트 루프가 차단되어 서비스 거부(DoS) 상태에 빠질 수 있습니다.
💡 쉬운 설명
특수하게 조작된 TOML 파일을 읽을 때 컴퓨터가 계산을 너무 많이 하느라 멈춰버리는 문제입니다. 이로 인해 웹 서버 등이 응답을 하지 못하게 되어 서비스가 중단될 수 있습니다.
🇺🇸 원문 (English)
toml-node is a TOML parser for Node.js and the browser. Prior to 5.0.1, the toml.parse() compiler's addTableArray() function in lib/compiler.js rescans the complete assignedPaths and valueAssignments bookkeeping sets for every array-of-tables header. Distinct [[name]] paths are not pruned, so a document with many such headers causes quadratic synchronous work and can block the Node.js event loop, denying service to other operations in the process. This issue is fixed in version 5.0.1.
📍 영향받는 시스템
toml-node version < 5.0.1
⚔️ 공격 벡터
악의적으로 조작된 다수의 [[name]] 헤더를 포함한 TOML 파일을 파싱하도록 유도
🛡️ 대응 방법
toml-node 버전을 5.0.1 이상으로 업데이트
🔧 검증 코드
출력된 결과에서 toml-node의 버전이 5.0.1 미만인지 확인