🇰🇷 한글 설명
Axios 0.32.0 및 1.16.0 미만 버전은 프로토타입 오염을 통해 헤더가 유출되거나 요청 중 TypeError가 발생하는 취약점이 있습니다. 이는 같은 프로세스 내 의존성으로 인한 Object.prototype 오염 시 Axios가 오염된 값을 처리하면서 발생합니다.
💡 쉬운 설명
Axios 라이브러리에 보안 결함이 있어, 다른 프로그램의 오류가 Axios를 통해 민감한 데이터를 유출하거나 프로그램을 충돌시킬 수 있습니다. 이를 방지하려면 최신 버전으로 업데이트해야 합니다.
🇺🇸 원문 (English)
Axios is a promise based HTTP client for the browser and Node.js. Prior to 0.32.0 and 1.16.0, axios exposes two read-side prototype-pollution gadgets. When Object.prototype is polluted by an upstream dependency in the same process (e.g. lodash _.merge / CVE-2018-16487), axios silently picks up the polluted values. (1) lib/utils.js line 406 builds merge()'s accumulator as result = {}, so result[targetKey] (line 414) walks Object.prototype and the polluted bucket's own keys are copied into the merged headers and ride out on the wire. (2) lib/core/mergeConfig.js line 26 builds the hasOwnProperty descriptor as a plain-object literal. Object.defineProperty reads descriptor.get/descriptor.set via the prototype chain, so a polluted Object.prototype.get or Object.prototype.set makes the call throw TypeError synchronously on every axios request. This vulnerability is fixed in 0.32.0 and 1.16.0.
📍 영향받는 시스템
Axios < 0.32.0, Axios < 1.16.0
⚔️ 공격 벡터
동일 프로세스 내 의존성을 통한 Object.prototype 오염 및 Axios의 내부 처리 로직 이용
🛡️ 대응 방법
Axios를 0.32.0 또는 1.16.0 이상으로 즉시 업그레이드하십시오.
🔧 검증 코드
출력된 버전 번호가 0.32.0 또는 1.16.0 미만인 경우 취약한 상태입니다.
npm list axios 2>/dev/null | grep -E 'axios@'