Lab Icon

XXE Exposed

Challenge Updated 21 Jun 2026 Solution (Pro)
XXE XML Security File Disclosure External Entity Web Security Vulnerability Assessment

Start the machine, hack the system, and find the hidden flags to complete this challenge and earn XP!

1
Flags
50
XP
69%
Success Rate

XML External Entity (XXE) injection is a web security vulnerability that targets applications processing XML input. When XML parsers are configured to resolve external entity references, attackers can exploit this functionality to read arbitrary files from the server, perform Server-Side Request Forgery (SSRF), and in some cases achieve remote code execution. XXE has been recognized as a critical threat in the OWASP Top 10 and affects any application that parses XML data from untrusted sources.

How XXE Attacks Work

XML supports a feature called external entities, defined in the Document Type Definition (DTD), that allows XML documents to reference external resources. An entity declaration like <!ENTITY xxe SYSTEM "file:///etc/passwd"> instructs the XML parser to fetch the contents of the specified file and include it wherever the entity reference &xxe; appears in the document. When an application reflects parsed XML content back to the user, the file contents are disclosed in the response.

The attack surface for XXE is broader than many developers realize. Any endpoint that accepts XML input is potentially vulnerable - this includes SOAP web services, RSS feed processors, document upload handlers (DOCX, XLSX, and SVG files are all XML-based), SAML authentication flows, and configuration file parsers. Even applications that appear to use JSON may accept XML if the Content-Type header is changed, as many frameworks support multiple content types transparently.

Advanced XXE Techniques

When the application does not directly reflect XML content, attackers can use out-of-band (OOB) techniques to exfiltrate data. By defining external entities that make HTTP requests to an attacker-controlled server with file contents encoded in the URL, sensitive data can be extracted without any visible output in the application response. Parameter entities and error-based techniques provide additional exfiltration channels when standard approaches fail.

Preventing XXE Vulnerabilities

The most effective defense against XXE is disabling external entity processing in the XML parser configuration. In Java, this means setting features like disallow-doctype-decl and external-general-entities to prevent entity resolution. Most modern XML libraries default to secure configurations, but legacy code and some frameworks still enable dangerous features. Input validation, using JSON instead of XML where possible, and regular security testing complement parser hardening.

What You Will Learn

  • Understand XML External Entity processing and how parsers resolve external references
  • Learn to craft XXE payloads for file disclosure and SSRF attacks
  • Master out-of-band data exfiltration techniques when direct output is unavailable
  • Recognize the various attack surfaces where XXE can occur beyond traditional XML endpoints
  • Develop skills for testing and remediating XXE vulnerabilities in web applications

Prerequisites

Basic understanding of XML structure and syntax Familiarity with HTTP and web applications Knowledge of Linux file system paths

Ready to hack this lab?

Create a free account and start practicing cybersecurity hands-on.

Start Hacking - It's Free
Start Your Challenge
~1-2 min setup
Dedicated server
Private instance
Standard power
New here? Here's what to do
1
Click "Start Lab" above You'll get your own private machine with an IP address
2
Explore the target Open the IP in your browser and look for vulnerabilities
3
Find and submit flags Flags are secret text strings hidden in the system - paste them below to score

Ready to hack this lab?

Create a free account to start your own dedicated server, submit flags, and earn XP on the leaderboard.

Start Hacking Free
13,000+ Hackers 100+ Labs & Courses Free
Start Hacking Free