🇰🇷 한글 설명
Node.js 및 브라우저용 counterpart 라이브러리의 번역 키 처리에서 사용자 입력 검증 부족으로 인한 프로토타입 오염 취약점입니다. __proto__ 같은 특수 문자를 포함한 악의적 키를 통해 JavaScript Object 프로토타입에 임의 속성을 주입할 수 있습니다.
💡 쉬운 설명
counterpart 라이브러리가 번역 문구를 처리할 때 위험한 입력값을 제대로 걸러내지 못합니다. 공격자가 특수하게 조작된 문자를 보내면 프로그램의 기본 작동 방식을 변경하여 시스템을 중단시키거나 악의적 코드를 실행할 수 있습니다.
🇺🇸 원문 (English)
A vulnerability exists in the 'counterpart' library for Node.js and the browser due to insufficient sanitization of user-controlled input in translation key processing. The affected versions prior to 0.18.6 allow attackers to manipulate the library's translation functionality by supplying maliciously crafted keys containing prototype chain elements (e.g., __proto__ ), leading to prototype pollution. This weakness enables adversaries to inject arbitrary properties into the JavaScript Object prototype through the first parameter of the translate method when combined with specific separator configurations, potentially resulting in denial-of-service conditions or remote code execution in vulnerable applications. The issue arises from the library's failure to properly validate or neutralize special characters in translation key inputs before processing.
📍 영향받는 시스템
counterpart 라이브러리 0.18.5 이하 (Node.js 및 브라우저 환경)
⚔️ 공격 벡터
translate() 메서드의 첫 번째 매개변수에 __proto__ 를 포함한 프로토타입 오염 페이로드 전달
🛡️ 대응 방법
counterpart 라이브러리를 0.18.6 이상으로 업그레이드
🔧 검증 코드
출력된 버전이 0.18.6 미만이면 취약한 상태이므로 즉시 업그레이드 필요
npm list counterpart 2>/dev/null | grep counterpart || echo 'not installed'