The Hunt for XXE to LFI: How I Uncovered CVE-2019–9670 in a Bug Bounty Program
The target ran a vulnerable version of Zimbra Collaboration Suite with an XXE flaw in its Autodiscover endpoint, allowing an attacker to read local files. Exploiting it could lead to full server compromise.
Published on infosecwriteups.com
A few months ago, during one of my late-night bug bounty hunting sessions, I stumbled upon a critical vulnerability that could lead to a full server takeover. The target was a well-known program, and I was determined to dig deep.
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
During a late-night bug bounty session the researcher found a vulnerability in a well-known program that, in his words, could lead to a full server takeover. The target was running Synacor Zimbra Collaboration Suite version 8.7.x, and the flaw is tracked as CVE-2019-9670: an XML External Entity (XXE) vulnerability in the mailboxd component that can lead to Local File Inclusion (LFI).
The requests in the report target the path /Autodiscover/Autodiscover.xml. The report does not describe what Autodiscover normally does beyond that; the relevant point is that the server parses attacker-supplied XML.
Setup
The researcher's initial scans showed the server was running Zimbra Collaboration Suite 8.7.x. No accounts, roles or credentials are mentioned. The tools used were a terminal with curl, a payload file named payload.xml, and a Python tool the researcher published for detecting the vulnerability, installable from PyPI as CVE-2019-9670.
Finding it
While probing the target, the researcher noticed something peculiar about the way the server handled XML inputs. The version fingerprint from the scans, Zimbra 8.7.x, was known to have vulnerabilities, and CVE-2019-9670 stood out: an XXE that could lead to LFI. The bug exists in the mailboxd component and lets an attacker inject malicious XML content that can read sensitive files on the server.
Exploitation
Step 1: Prepare the terminal
The researcher opened a terminal to send requests to the vulnerable domain.
Step 2: Send a first request to the Autodiscover endpoint
curl -X POST https://mytargetprogram.com/Autodiscover/Autodiscover.xml -d @payload.xml
This sends a POST to /Autodiscover/Autodiscover.xml with the body read from payload.xml. The report does not show the contents of payload.xml.
Step 3: Craft the malicious payload
The report says to craft a malicious payload to exploit the XXE, but the payload itself is not included in the text.
Step 4: Send the payload and read the response
If the server responds with file contents such as /etc/passwd, the vulnerability is confirmed.
Step 5: Repeat with an explicit XML content type
curl -X POST -H "Content-Type: application/xml" -d @payload.xml https://mytargetprogram.com/Autodiscover/Autodiscover.xml
This is the same POST with Content-Type: application/xml set explicitly, so the server treats the body as XML. A response containing sensitive file data confirms the flaw.
Automating the hunt
The researcher built a Python tool for detecting the vulnerability, published on PyPI as CVE-2019-9670. The install command as printed in the report is:
pip install CVE-2019-9670CVE-2019-9670 --chatid <YourTelegramChatID>
To check a single URL:
CVE-2019-9670 -u http://mytargetprogram.com
To check a list of URLs:
CVE-2019-9670 -i urls.txt
The report shows these two commands but does not explain the flags.
Root cause
The report attributes the flaw to the mailboxd component of Zimbra Collaboration Suite 8.7.x, where an XXE vulnerability lets injected XML read sensitive files on the server.
Impact
If exploited, the flaw could lead to complete server compromise: an attacker could read, create, modify and delete data on the target server. The researcher reported it to the program, which promptly patched the issue.
Fix
Variants to test
- A response containing that file's contents, such as
/etc/passwd, is a positive result.
Proof of concept
The report closes with two screenshots labelled POC.


What happened, in plain words
A security researcher was spending a late night hunting for bugs in a bug bounty program. A bug bounty program is a scheme run by an organisation that pays (or at least thanks) people who find security problems in its systems and report them privately instead of abusing them. During that session he found a serious flaw in a well-known target. In his words, the flaw could lead to a full server takeover, meaning an outsider could end up controlling the machine rather than just seeing one page.
The target was running a piece of software called Synacor Zimbra Collaboration Suite, version 8.7.x. Zimbra is a mail and collaboration product: organisations use it for email, calendars and shared folders, a bit like a self-hosted version of a webmail service. Version numbers matter because old versions keep old mistakes, and this version had a known one.
The flaw is tracked as CVE-2019-9670. A CVE is a public catalogue number for a specific security bug, so researchers and vendors can refer to the same thing unambiguously. This particular bug is an XML External Entity (XXE) vulnerability that can lead to Local File Inclusion (LFI). Both terms are explained below, but in one sentence: the server can be tricked, through a specially built XML document, into reading files that sit on its own disk and handing their contents back to the attacker.
The requests in the report target the path /Autodiscover/Autodiscover.xml. An endpoint is simply a specific address on a server that accepts a particular kind of request, like a service window in a building: you go to the right window with the right form. XML is a text format for structured data, using tags in angle brackets, similar in spirit to HTML but meant for carrying data rather than displaying it. The report does not describe what Autodiscover normally does beyond accepting XML; the relevant point is that the server parses XML that the attacker supplies.
The discovery
While probing the target, the researcher noticed something peculiar about the way the server handled XML inputs. Probing here means sending ordinary requests and watching how the server reacts, the way you might knock on different doors of a house to hear which ones sound hollow.
His initial scans revealed the server was running Zimbra Collaboration Suite 8.7.x. A scan is an automated set of requests whose answers hint at what software and version is running. He knew that version had known vulnerabilities, and CVE-2019-9670 caught his eye: an XXE that could lead to LFI.
No accounts, roles or credentials are mentioned in the report, so nothing here depends on logging in. The tools involved were a terminal with curl, a payload file named payload.xml, and a Python tool the researcher published for detecting the vulnerability, installable from PyPI as CVE-2019-9670. A terminal is the text window where you type commands instead of clicking. curl is a command-line program for sending web requests. A payload is the crafted content you send to trigger a bug. PyPI is the public package index for Python software, the equivalent of an app store for Python tools.
Understanding the vulnerability
CVE-2019-9670 exists in the mailboxd component of Zimbra Collaboration Suite. A component is one part of a larger product, here the part that handles mailboxes. The XXE vulnerability lets an attacker inject malicious XML content that can read sensitive files on the server.
To understand XXE from zero, you need one idea about XML: an XML document can declare an "entity", which is a named placeholder that gets replaced by other content when the document is processed. Some parsers also allow an "external" entity, whose replacement content is fetched from somewhere else, including a file on the server's own disk. If the application then shows you the processed document, the file's contents come back to you. The everyday comparison is a form that says "write your name here" and a helpful clerk who, instead of your name, fetches whatever document you point at and reads it aloud. The clerk is doing exactly what the form allows; the mistake is that the form allowed it at all.
LFI, Local File Inclusion, is the result: the server includes a local file in its response. Files such as /etc/passwd are interesting because on Unix-like systems that file lists user accounts, and reading it proves you can reach files you were never meant to see. If exploited, the flaw could lead to complete server compromise, allowing an attacker to read, create, modify and delete data on the target server.
Steps to reproduce
Armed with this knowledge, the researcher tested the vulnerability. Here is the sequence, with each step explained.
- Open your terminal and get ready to send some requests. The terminal is where the commands below are typed; nothing here needs a browser.
- Execute the following CURL command to send a GET request to the vulnerable domain:
curl -X POST https://mytargetprogram.com/Autodiscover/Autodiscover.xml -d @payload.xml
Line by line: curl is the program being run. -X POST chooses the HTTP method. HTTP is the language browsers and servers speak; a method is the verb of a request, and POST is the verb used to send data to the server, as opposed to GET, which normally just asks for a page. https://mytargetprogram.com/Autodiscover/Autodiscover.xml is the address being contacted: the domain, then the path to the Autodiscover endpoint. -d @payload.xml attaches a body to the request, and the @ means "read that body from the file called payload.xml" rather than from the command line. The report does not show what is inside payload.xml.
One detail worth noticing: the step is described as sending a GET request, but the command actually uses POST. The command is what was run.
- Craft a malicious payload to exploit the XXE vulnerability. This is the XML document used to trigger the bug; the report does not include its contents. The report says to craft it but does not include its contents in the text.
- Send the payload and observe the response. If the server responds with file contents like
/etc/passwd, you have confirmed the vulnerability. Observing the response is the whole test: you are looking for text that could only have come from the server's disk. - Use the following CURL command to test with the crafted payload:
curl -X POST -H "Content-Type: application/xml" -d @payload.xml https://mytargetprogram.com/Autodiscover/Autodiscover.xml
This is the same request as before with one addition. -H adds a header, and a header is a small label sent alongside a request that describes it, like the label on a parcel saying what is inside. "Content-Type: application/xml" tells the server explicitly that the body is XML, so it should parse it as XML. If you receive a response containing sensitive file data, the flaw is confirmed.
Automating the hunt
To streamline the process, the researcher built a Python tool specifically for detecting this vulnerability. Automating means writing a program to repeat the same test many times, which matters once you have more than one target. You can install it using pip, Python's package installer, and automate your testing.
ToolPOC: CVE-2019-9670 on PyPI
pip install CVE-2019-9670CVE-2019-9670 --chatid <YourTelegramChatID>
pip install fetches and installs a package from PyPI. The package name as printed in the report is CVE-2019-9670CVE-2019-9670, which looks like the name written twice by accident; the command is reproduced exactly as it appears. --chatid <YourTelegramChatID> passes an option whose value is a Telegram chat identifier, a number or name that identifies a chat in the Telegram messaging app, presumably so the tool can send results there. The angle brackets are a placeholder: you would replace them with your own value.
- To check a single URL:
CVE-2019-9670 -u http://mytargetprogram.com
Here CVE-2019-9670 is the installed tool being run, and -u takes one target URL, the address to test.
- To check a list of URLs:
Wait, the list command in the report is:
CVE-2019-9670 -i urls.txt
The report shows this command but does not explain the flag.
Root cause
The report attributes the flaw to the mailboxd component of Zimbra Collaboration Suite 8.7.x, where an XXE vulnerability lets injected XML read sensitive files on the server. In plain terms, the parser was too helpful: it honoured a request to fetch outside content when it should have refused.
Impact
If exploited, the flaw could lead to complete server compromise: an attacker could read, create, modify and delete data on the target server. Reading a file such as /etc/passwd is the proof; the ability to reach arbitrary files is the danger. The researcher reported it to the program, which promptly patched the issue.
Fix
Variants to test
- A response containing that file's contents, such as
/etc/passwd, is a positive result. - Content negotiation is the back-and-forth where a client says what format it is sending and the server decides how to treat it.
Proof of concept
A proof of concept is the evidence that the bug is real: the request and the response that shows it working. The report closes with two screenshots labelled POC.


Glossary
- API: a defined way for one program to talk to another, like a service counter with fixed rules about what you can ask for.
- Bug bounty program: a scheme where an organisation invites outsiders to report security problems, often with a reward.
- Component: one part of a larger software product, here the mailboxd part of Zimbra.
- Content-Type: a request header that says what format the body is in, such as XML.
curl: a command-line program for sending web requests.- CVE: a public catalogue number for a specific security vulnerability.
- Endpoint: a specific address on a server that accepts a particular kind of request.
- Entity (XML): a named placeholder inside an XML document that is replaced by other content when the document is processed.
- External entity: an entity whose replacement content is fetched from outside the document, including a file on the server's disk.
- GET: an HTTP method normally used to ask for a page or resource.
- Header: a small label sent with a request or response describing it.
- HTTP: the language browsers and servers use to exchange requests and responses.
- LFI (Local File Inclusion): making a server include a file from its own disk in a response.
- mailboxd: the Zimbra component where the report places the flaw.
- Method: the verb of an HTTP request, such as GET or POST.
- Payload: the crafted content sent to trigger a vulnerability.
- pip: Python's package installer.
- POST: an HTTP method used to send data to the server.
- Proof of concept (POC): evidence, such as a request and its response, that a bug is real.
- PyPI: the public package index for Python software.
- Scan: an automated set of requests used to learn what software and version a server runs.
- Server takeover: an attacker gaining control of a server rather than only seeing one page.
- Terminal: the text window where commands are typed.
- XML: a text format for structured data using tags in angle brackets.
- XXE (XML External Entity): a vulnerability where a parser resolves external entities in attacker-supplied XML, letting it read files or make requests it should not.
- Zimbra Collaboration Suite: a mail and collaboration product used by organisations for email, calendars and shared folders.