🇰🇷 한글 설명
Axios 0.28.0 버전부터 0.30.2 및 1.12.0 미만 버전에서 Node.js 환경 사용 시 발생하는 취약점입니다. 공격자가 매우 큰 'data:' 스킴 URL을 제공하면 Axios가 이를 메모리에 모두 로드하여 제한 없이 메모리를 할당함으로써 프로세스를 중단시키는 서비스 거부(DoS) 공격이 가능합니다.
💡 쉬운 설명
공격자가 아주 큰 데이터를 담은 특수한 주소를 보내면, 프로그램이 이를 처리하려다 메모리를 전부 써버려 컴퓨터가 멈추거나 꺼질 수 있는 문제입니다. 이는 데이터 크기 제한 설정을 무시하기 때문에 발생합니다.
🇺🇸 원문 (English)
Axios is a promise based HTTP client for the browser and Node.js. When Axios starting in version 0.28.0 and prior to versions 0.30.2 and 1.12.0 runs on Node.js and is given a URL with the `data:` scheme, it does not perform HTTP. Instead, its Node http adapter decodes the entire payload into memory (`Buffer`/`Blob`) and returns a synthetic 200 response. This path ignores `maxContentLength` / `maxBodyLength` (which only protect HTTP responses), so an attacker can supply a very large `data:` URI and cause the process to allocate unbounded memory and crash (DoS), even if the caller requested `responseType: 'stream'`. Versions 0.30.2 and 1.12.0 contain a patch for the issue.
📍 영향받는 시스템
Axios versions 0.28.0 up to (but not including) 0.30.2 and 1.12.0 (Node.js environment)
⚔️ 공격 벡터
공격자가 매우 큰 페이로드를 포함한 'data:' 스킴 URL을 Axios 요청에 전달
🛡️ 대응 방법
Axios를 0.30.2 또는 1.12.0 이상의 버전으로 업데이트
🔧 검증 코드
출력된 결과에서 axios의 버전을 확인하여 취약한 범위(0.28.0 ~ 0.30.1 또는 1.12.0 미만)에 해당하는지 확인
npm list axios | grep axios