🇰🇷 한글 설명
Axios 라이브러리의 프로토타입 오염 취약점으로, Object.prototype을 조작하여 모든 HTTP 오류 응답(401, 403, 500 등)을 성공으로 위장할 수 있습니다. 이를 통해 애플리케이션의 인증 및 오류 처리가 완전히 우회되며, validateStatus 설정 속성의 mergeDirectKeys 병합 전략이 원인입니다.
💡 쉬운 설명
Axios 라이브러리에 결함이 있어서 특정 방식으로 조작하면 서버의 오류 응답이 성공한 것처럼 보이게 할 수 있습니다. 이는 로그인이 필요한 시스템에서 인증을 무시하고 접근하거나 오류를 숨길 수 있게 해줍니다.
🇺🇸 원문 (English)
Axios is a promise based HTTP client for the browser and Node.js. Prior to 1.15.1 and 0.31.1, the Axios library is vulnerable to a Prototype Pollution "Gadget" attack that allows any Object.prototype pollution to silently suppress all HTTP error responses (401, 403, 500, etc.), causing them to be treated as successful responses. This completely bypasses application-level authentication and error handling. The root cause is that validateStatus is the only config property using the mergeDirectKeys merge strategy, which uses JavaScript's in operator — an operator that inherently traverses the prototype chain. When Object.prototype.validateStatus is polluted with () => true, all HTTP status codes are accepted as success. This vulnerability is fixed in 1.15.1 and 0.31.1.
📍 영향받는 시스템
Axios < 1.15.1 및 Axios < 0.31.1 (Node.js 및 브라우저)
⚔️ 공격 벡터
프로토타입 오염(Prototype Pollution) - Object.prototype.validateStatus를 true를 반환하는 함수로 오염시켜 모든 HTTP 상태 코드를 성공으로 처리
🛡️ 대응 방법
Axios를 1.15.1 이상 또는 0.31.1 이상으로 업그레이드 (npm update axios)
🔧 검증 코드
출력된 버전이 1.15.1 이상 또는 0.31.1 이상이면 패치됨. 1.15.0 이하 또는 0.31.0 이하면 취약함.
npm list axios 2>/dev/null | grep axios | grep -oE '[0-9]+\.[0-9]+\.[0-9]+' | head -1