*How an exposed eXist-db REST interface revealed application collections, configuration files, and arbitrary XQuery execution without requiring authentication.*
An eXist-db REST interface was exposed without authentication, allowing anyone to browse database collections, read application source code and configuration files, and execute arbitrary XQuery expressions. An attacker could enumerate the database and extract sensitive information.
Cybersecurity
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
eXist-db is an open-source native XML database, widely used for digital archives, research platforms and XML-based web applications. Its REST interface exposes database collections over HTTP, and it also offers built-in query functionality that evaluates XQuery expressions server-side. Those features exist to let administrators and developers browse collections and run queries against the stored XML.
During a Vulnerability Disclosure Program (VDP) assessment, the researcher found an application powered by eXist-db whose REST interface was reachable from the internet with no authentication in front of it. What began as an apparent directory listing turned into unauthenticated database enumeration, source code and configuration disclosure, and arbitrary XQuery execution. The submission was eventually marked as a duplicate, but the underlying issue had already been classified with Exceptional severity.
Setup
The assessment was a VDP engagement. No accounts, roles, credentials or special tooling are described: the whole finding rests on requests that any remote user could send without logging in.
Finding it
Reconnaissance surfaced an eXist-db REST endpoint on the application, of the form:
/exist/rest/db/
Instead of returning an authentication challenge, the path immediately returned the root database collection. A database answering an anonymous request with its contents is worth pulling on, so the researcher started browsing.

Exploitation
Step 1: Browse the root collection
Requesting the REST path above returned the root collection listing rather than a login prompt. That alone confirmed the interface was exposed without access control.
Step 2: Enumerate collections recursively
The REST interface allowed unrestricted browsing of database collections. Beyond public resources, the server exposed multiple application collections containing deployed projects and application components. Each collection could be explored recursively, so the internal architecture of the application could be mapped without logging in. That visibility removes most of the guesswork an attacker would otherwise need in order to locate sensitive files and viable attack paths.
Step 3: Read application resources
Continuing through the collections, application resources turned out to be readable directly through the REST API. The exposed content included:
- Application source code
- XML configuration files
- Installation resources
- Deployment scripts
- Docker-related files
- Environment configuration files
Configuration files matter because they show how an application talks to databases, authentication services and internal infrastructure. Even without passwords, usernames, internal hosts and deployment details are useful intelligence.
Step 4: Test the built-in query functionality
The most significant finding came from the REST API's built-in query feature. The endpoint accepted an XQuery expression through a query parameter and executed it directly on the server, confirming that arbitrary XQuery expressions could be evaluated without authentication. Unlike SQL injection, this was intended functionality that simply had no protection around it.
Step 5: Enumerate the database at scale
With XQuery available, accessible collections could be queried and traversed programmatically. The database held a large amount of XML data spread across numerous application collections, so the issue moved from information disclosure to full database enumeration: an attacker would not need to browse files one by one, but could query the available XML documents directly.
Some administrative collections remained protected, but the accessible application collections still exposed a substantial amount of sensitive information.
Root cause
The eXist-db REST interface was publicly accessible without enforcing authentication. Features meant for administrators and developers, including query execution and collection browsing, were available to any remote user. When powerful administrative functionality is exposed without access control, legitimate features become security vulnerabilities.
Impact
An unauthenticated attacker could potentially:
- Enumerate database collections
- Read application source code
- Access configuration files
- Extract application data
- Execute arbitrary XQuery expressions
- Map the application's internal structure
- Gather intelligence for follow-up attacks
The exposure significantly increased the application's attack surface. The report was closed as a duplicate, and the original issue was classified with Exceptional severity.
Fix
No remediation performed by the organisation is described. The report's recommendations for eXist-db and similar platforms are:
- Require authentication for all REST API endpoints.
- Restrict database management interfaces to trusted internal networks.
- Disable public query execution functionality unless absolutely necessary.
- Remove sensitive configuration files from accessible database collections.
- Follow vendor hardening guidance before deploying production systems.
- Periodically audit exposed services to ensure administrative functionality is not publicly reachable.
Variants to test
- Probe
/exist/rest/db/on any host fingerprinting as eXist-db. A positive result is a collection listing returned without an authentication challenge. - Walk sub-collections recursively from the root. A positive result is application directories, deployment scripts or Docker and environment files appearing in the listings.
- Send an XQuery expression through the REST query parameter. A positive result is the expression being evaluated server-side without authentication.
- Use XQuery to traverse and count documents across collections. A positive result is programmatic enumeration of XML data that would otherwise require many manual requests.
- Check whether administrative collections are reachable with the same anonymous access. A positive result is administrative content returned without authentication.
- Look for other exposed management interfaces during reconnaissance, such as database APIs, search consoles and developer endpoints. A positive result is any of them answering without authentication.
What happened, in plain words
A security researcher was looking at a website as part of a Vulnerability Disclosure Program (VDP). A VDP is a scheme where an organisation invites outside people to report security problems to it.
The website was built on a piece of software called eXist-db. eXist-db is a database, which is a program that stores information in an organised way so other programs can look things up later. What makes eXist-db special is that it stores information as XML, a text format that wraps data in tags, a bit like a very strict version of the labels on folders in a filing cabinet. eXist-db is often used for digital archives, research platforms and websites that are built around XML documents.
eXist-db comes with a REST interface. REST is a way for one program to talk to another over the web using ordinary web addresses and the same HTTP protocol your browser uses. Think of it as a service counter: you walk up with a request written in a standard way, and the counter hands back what you asked for. The interface is meant to let administrators and developers browse the stored collections and run queries.
A collection, in eXist-db, is roughly what a folder is on your computer: a container that holds documents and can hold other collections inside it. A query is a question you ask the database, written in a small language called XQuery, and the database answers with the matching data.
The problem was that this service counter was open to the whole internet with no authentication. Authentication is the step where a system checks who you are, usually with a username and password, before letting you in. Here there was no such step: anyone who knew the address could walk up and ask.
What started as what looked like a simple list of folders turned into four things at once: listing the database contents without logging in, reading the application's source code, reading its configuration files, and running XQuery expressions on the server. The researcher submitted the finding, and it was marked as a duplicate because another researcher had reported the same issue first. The original issue had already been classified with Exceptional severity.

Introduction
The researcher's starting point is a common one in this kind of work: technologies that developers set up and then forget to lock down. A database is often installed to get an application working, and the security settings around it get less attention than the application itself.
During the VDP assessment the researcher found an application powered by eXist-db. Instead of a traditional web vulnerability, the finding was that the REST interface itself was reachable from the internet without authentication.
What first looked like a directory listing, meaning a plain list of folder names, grew into something more serious:
- Unauthenticated database enumeration, which means listing what is inside the database without proving who you are
- Source code disclosure, which means the program's own instructions becoming readable
- Configuration file exposure, which means the settings files that describe how the application is wired together becoming readable
- Arbitrary XQuery execution, which means being able to send any XQuery question you like and have the server run it
The submission was marked as a duplicate, but the issue itself had been classified with Exceptional severity.
Discovery
Reconnaissance is the information-gathering phase at the start of an assessment: looking at what a target exposes before trying anything clever. During reconnaissance the researcher noticed an eXist-db REST endpoint. An endpoint is simply a web address that a program answers on, the equivalent of a particular counter window in a large building.
The endpoint looked similar to:
/exist/rest/db/
Line by line, in plain words:
/exist/is the first part of the path, naming the eXist-db software on the server./rest/names the REST interface, the part that speaks the standard web request language./db/names the database area, the top of the collection tree.
Put together, the address says: "using the eXist-db REST interface, show me the database." There is nothing secret in the address itself; the question is what the server does when it receives it.
Rather than returning an authentication challenge, which is the server's way of saying "prove who you are first" (usually a login box or a 401 response), the path immediately returned the root database collection. The root collection is the top-level folder of the database, the one that contains everything else.
Seeing a database answer an anonymous request with its contents is always worth investigating further. The reason is simple: if the front door opens without a key, the rooms behind it are worth checking.
Enumerating the Database
The REST interface allowed unrestricted browsing of database collections. Browsing here means following links or changing the address to move from one collection to another, the same way you click through folders in a file manager.
Instead of exposing only public resources, the server revealed multiple application collections containing deployed projects and application components. In other words, the list was not limited to things meant to be public; it included the working parts of the application itself.
Each collection could be explored recursively. Recursively means going into a collection, then into the collections inside it, then into the ones inside those, and so on, until you have seen the whole tree. It is the difference between glancing at the top shelf and emptying every box on every shelf.
For an attacker, this level of visibility dramatically reduces the effort required to identify sensitive files and potential attack paths. Normally an attacker has to guess file names and addresses; here the database simply told them what exists.
Source Code and Configuration Exposure
As the researcher continued exploring the collections, application resources turned out to be readable directly through the REST API. An API, short for Application Programming Interface, is the set of addresses and rules one program uses to ask another program for things. The REST interface is the API here.
Among the exposed content were:
- Application source code, the human-written instructions that make the application work
- XML configuration files, settings written in XML that tell the application how to behave
- Installation resources, files used when the application is set up
- Deployment scripts, files that automate putting the application onto a server
- Docker-related files, files describing how the application is packaged into containers, which are self-contained bundles that include everything a program needs to run
- Environment configuration files, files that hold settings for a particular installation, often including connection details
Configuration files are particularly valuable during security assessments because they often reveal how an application communicates with databases, authentication services and internal infrastructure. Even when passwords are absent, usernames, internal hosts and deployment details provide useful intelligence. Intelligence here means information that helps plan the next step, the way a floor plan helps someone find the room they want.
Discovering Arbitrary XQuery Execution
The most significant finding came when the researcher tested the REST API's built-in query functionality. The endpoint accepted an XQuery expression through a query parameter and executed it directly on the server.
A query parameter is the part of a web address after a question mark, used to pass a value to the server. An XQuery expression is a question written in XQuery, the query language eXist-db understands.
This confirmed that arbitrary XQuery expressions could be evaluated without authentication. Arbitrary means any expression at all, not just the ones the application intended to offer. Evaluated means the server actually ran it and produced a result.
Unlike SQL Injection, this functionality was part of the application's intended feature set; it simply wasn't protected. SQL injection is a classic attack where an attacker slips database commands into an input that was only meant to hold ordinary data. Here no trickery was needed: the feature was designed to run queries, and it was left open.
Once confirmed, it became possible to query accessible XML collections directly through the REST interface.
Large-Scale Database Enumeration
Using XQuery, the researcher verified that accessible collections could be queried and traversed programmatically. Programmatically means by sending requests from a script rather than clicking around by hand, so hundreds of collections can be checked in the time it would take to open a few.
The exposed database contained an extensive amount of XML data distributed across numerous application collections. This transformed what initially appeared to be an information disclosure issue into a full database enumeration vulnerability. Information disclosure means information leaking out that should have stayed private; enumeration means systematically listing what is there.
An attacker would not need to manually browse files one at a time; they could query the available XML documents directly. The difference is like the difference between reading every page of a library catalogue by hand and asking the librarian for a list of every book matching a pattern.
Security Impact
Attack surface is the total set of ways into a system: every address, every feature, every login form. The exposed REST interface significantly increased the application's attack surface, because it added a wide-open door to a building that may otherwise have been locked.
An unauthenticated attacker could potentially:
- Enumerate database collections
- Read application source code
- Access configuration files
- Extract application data
- Execute arbitrary XQuery expressions
- Map the application's internal structure
- Gather intelligence for follow-up attacks
Although some administrative collections remained protected, the accessible application collections still exposed a substantial amount of sensitive information. Administrative collections are the ones used to manage the database itself, and those stayed out of reach; everything in the application collections was available.
Root Cause
Root cause means the underlying reason the problem existed, as opposed to its symptoms. The vulnerability existed because the eXist-db REST interface was publicly accessible without enforcing authentication. Enforcing means actually checking, not merely offering the option to check.
Features intended for administrators and developers, including query execution and collection browsing, were available to any remote user. When powerful administrative functionality is exposed without access control, even legitimate features become security vulnerabilities. Legitimate here means the feature works exactly as designed; the design simply assumed it would only be reachable by trusted people.
Responsible Disclosure
Responsible disclosure is the practice of telling the organisation privately first, giving it time to fix the issue, rather than publishing it immediately. After documenting the affected endpoint, captured responses and demonstrated impact, the researcher submitted the issue through the organisation's VDP.
The triage team, the people who review incoming reports and decide what to do with them, confirmed that the vulnerability had already been reported by another researcher. The submission was marked as a duplicate, but the original issue had already been classified with Exceptional severity.
Duplicates are a normal part of this work: two people looking at the same target can find the same open door. It is a reminder that valuable findings often attract more than one pair of eyes.
Lessons Learned
The lesson the researcher draws is that not every critical vulnerability is a software bug. Sometimes the greatest risk comes from powerful features deployed without proper authentication.
Developer interfaces, database APIs, search consoles and administrative services are frequently overlooked during deployment and can expose an enormous amount of sensitive information when left publicly accessible. For researchers, identifying exposed management interfaces should always be part of reconnaissance. For developers and administrators, every administrative endpoint should be treated as sensitive and protected accordingly.
Recommendations
Organisations using eXist-db or similar database platforms should consider the following measures:
- Require authentication for all REST API endpoints.
- Restrict database management interfaces to trusted internal networks.
- Disable public query execution functionality unless absolutely necessary.
- Remove sensitive configuration files from accessible database collections.
- Follow vendor hardening guidance before deploying production systems.
- Periodically audit exposed services to ensure administrative functionality is not publicly reachable.
Hardening means deliberately reducing what a system exposes, the way you remove spare keys from under the doormat. Auditing means checking regularly, because a system that was closed last month may have been reopened since.
Final Thoughts
This finding shows how a single exposed REST interface can reveal far more than intended. Without exploiting a traditional injection vulnerability, the application exposed its internal structure, application resources and server-side query functionality simply because access controls were missing.
Sometimes the most impactful findings are not hidden deep inside an application; they are exposed in plain sight.
Variants to test
Each one is a request any remote user could send, with no account needed.
- Probe
/exist/rest/db/on any host that looks like eXist-db. A positive result is a collection listing returned without an authentication challenge. - Walk sub-collections recursively from the root. A positive result is application directories, deployment scripts or Docker and environment files appearing in the listings.
- Send an XQuery expression through the REST query parameter. A positive result is the expression being evaluated server-side without authentication.
- Use XQuery to traverse and count documents across collections. A positive result is programmatic enumeration of XML data that would otherwise require many manual requests.
- Check whether administrative collections are reachable with the same anonymous access. A positive result is administrative content returned without authentication.
- Look for other exposed management interfaces during reconnaissance, such as database APIs, search consoles and developer endpoints. A positive result is any of them answering without authentication.
Glossary
- API (Application Programming Interface): the set of addresses and rules one program uses to ask another program for things.
- Attack surface: the total set of ways into a system, such as addresses, features and login forms.
- Authentication: the step where a system checks who you are, usually with a username and password.
- Collection: in eXist-db, a container that holds documents and can hold other collections, roughly like a folder.
- Configuration file: a settings file that tells an application how to behave and how to connect to other services.
- Container: a self-contained bundle that includes everything a program needs to run.
- Deployment script: a file that automates putting an application onto a server.
- Duplicate: a report for an issue that another researcher has already reported.
- Endpoint: a web address that a program answers on.
- Enumeration: systematically listing what exists in a system.
- eXist-db: an open-source database that stores information as XML, often used for archives and research platforms.
- Hardening: deliberately reducing what a system exposes in order to make it safer.
- HTTP: the standard protocol browsers and servers use to exchange requests and responses on the web.
- Information disclosure: information leaking out that should have stayed private.
- Injection: an attack where commands are slipped into an input that was only meant to hold ordinary data.
- Intelligence: information gathered to help plan the next step.
- Parameter (query parameter): the part of a web address after a question mark, used to pass a value to the server.
- Programmatically: done by a script or program rather than by hand.
- Query: a question asked of a database.
- Recursive: going into a container, then into the containers inside it, and so on, until the whole tree is covered.
- Reconnaissance: the information-gathering phase at the start of an assessment.
- REST: a way for programs to talk to each other over the web using ordinary web addresses and HTTP.
- Root collection: the top-level collection of a database, containing everything else.
- Severity: a label describing how serious an issue is; here the original issue was classified with Exceptional severity.
- Source code: the human-written instructions that make an application work.
- SQL injection: an attack where database commands are slipped into an input meant for ordinary data.
- Triage team: the people who review incoming vulnerability reports and decide what to do with them.
- VDP (Vulnerability Disclosure Program): a scheme where an organisation invites outside people to report security problems to it.
- XML: a text format that wraps data in tags, used to store and exchange structured information.
- XQuery: the query language eXist-db understands for asking questions of stored XML.