본문으로 건너뛰기
cccskills
무료GitHub에 공개

prototype-pollution

Detect prototype pollution via object merge/clone/assign operations where __proto__ or constructor.prototype keys can modify Object.prototype.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(4)

  • SKILL.md3.0 KB
  • references/false-positive-indicators.md945 B
  • references/poc-skeleton.md1.7 KB
  • references/sinks.md1.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Prototype Pollution Detection

When to Use

Audit merge/clone/deep-assign utilities, query string parsers, JSON parsers, config mergers, and any package that recursively sets object properties from untrusted input.

Key insight: Only ~50% acceptance rate. Must demonstrate REAL impact beyond just polluting prototype.

Process

Step 1: Find Object Manipulation Sinks

grep -rn "Object\.assign\|Object\.defineProperty\|Object\.create" .
grep -rn "merge\|extend\|deepMerge\|deepExtend\|deepAssign\|mixin" .
grep -rn "clone\|deepClone\|cloneDeep\|deepCopy" .
grep -rn "set\|setPath\|setValue\|lodash\.set\|_.set" .
grep -rn "\[.*\]\s*=" . --include="*.js"  # Bracket notation assignment

Step 2: Check for Recursive Property Setting

Look for patterns where object keys from user input are used as property paths:

// VULNERABLE: recursive merge without key filtering
function merge(target, source) {
  for (const key in source) {
    if (typeof source[key] === 'object') {
      target[key] = merge(target[key] || {}, source[key]);
    } else {
      target[key] = source[key];
    }
  }
}

Step 3: Check Key Filtering

grep -rn "__proto__\|constructor\|prototype" . | grep -i "filter\|block\|skip\|ignore\|reject"
grep -rn "Object\.create(null)" .  # Null prototype objects are safe
grep -rn "hasOwnProperty\|Object\.keys\|Object\.entries" .

Step 4: Assess Impact

Prototype pollution alone is often not enough. Look for impact:

  • DoS: Polluted property causes TypeError crash (toString, valueOf)
  • Property injection: Polluted property affects security logic (isAdmin, role, auth)
  • Gadget chains: Polluted property reaches dangerous sink (eval, template)
  • Method clobbering: toString/valueOf overwritten causing crash

Dangerous Keys

KeyEffectImpact
__proto__Sets properties on Object.prototypeAll objects affected
constructor.prototypeSame effect via constructor chainAll objects affected
constructorOverwrites constructor referenceType confusion
toStringOverwrites string conversionTypeError on string operations
valueOfOverwrites value conversionTypeError on comparisons
hasOwnPropertyOverwrites property checkLogic bypass

CVSS Guidance

  • Proto pollution + RCE gadget chain: CRITICAL 9.8
  • Proto pollution + auth bypass: HIGH 8.1
  • Proto pollution + DoS (crash): HIGH 7.5
  • Proto pollution with no demonstrated impact: MEDIUM 5.3 (often rejected)

References

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

You are helping a penetration tester exploit misconfigured Active Directory

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ajtazer/heckit22026년 10월 7일 업데이트

You are helping a penetration tester enumerate an Active Directory domain and

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ajtazer/heckit22026년 10월 7일 업데이트

You are helping a penetration tester establish persistent access in Active

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ajtazer/heckit22026년 10월 7일 업데이트

You are helping a penetration tester exploit ADCS through template/CA access

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ajtazer/heckit22026년 10월 7일 업데이트

You are helping a penetration tester establish persistence through AD CS

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ajtazer/heckit22026년 10월 7일 업데이트

You are helping a penetration tester exploit misconfigured AD CS certificate

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

ajtazer/heckit22026년 10월 7일 업데이트

ajtazer의 스킬 모두 보기

이 스킬의 문제 신고