Skip to content
Info disclosure Write-up Beginner

Exposing Source Code Via Svn A 400 Discovery

An exposed SVN repository allowed anyone to download the wc.db file, which lists source code paths. The author used it to download source files and found database credentials, which could have given unauthorised access to the application's database.

Vipul Sahu Follow

Published on infosecwriteups.com

In this write-up, I will share how I uncovered a source code disclosure vulnerability through an exposed SVN (Subversion) repository. This subtle yet impactful issue led to significant risks, including the exposure of database credentials.

Vipul Sahu, on infosecwriteups.com

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.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

How it worked

Root cause

Likely the web server was misconfigured to serve the hidden .svn directory, including its wc.db metadata file, to the public.

Impact

The exposed source code and database credentials could have allowed attackers to gain unauthorised access to sensitive data and to steal intellectual property.

What the attacker needed

Publicly accessible .svn directory; No authentication required

The fix

The issue was fixed after responsible disclosure, though the text does not describe the exact fix; it should be fixed by blocking public access to .svn directories.

How it was found

  1. Check whether the .svn/wc.db file is publicly downloadable.
  2. Download the wc.db file.
  3. Query the wc.db file to list source code paths and their pristine file locations.
  4. Build URLs for the source code files from the query output.
  5. Download the source code files using the generated URLs.
  6. Inspect the downloaded files and find database credentials.

Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.

Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.

SVN is a version control system, like a shared folder that keeps old copies of code. If its hidden metadata folder is left on a public website, anyone can download a small database file that lists every source file. The author then fetched those files and found passwords for the database inside them.

What is Info disclosure?

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.

More by Vipul Sahu

View all

3 more disclosed reports, best first.

Similar reports

View all

Same bug class and techniques, clearest first.

Information disclosure

The lesson behind this report.

Data the application should keep private (personal data, internal details, other users' records) reaches someone it should not.