CVE-2016-2167
Medium · 6.8CVSS
6.8
EPSS
6.8%
Published
May 5, 2016
CISA due date
—
Cloudanix analysis
A flaw in older Subversion servers lets attackers pretend to be authorized users by sending a slightly altered name during login, potentially letting them read or change private code without permission.
- Exploitation
- Remote Authenticated
- Attacker needs
- Low Privilege
- Complexity
- High
- Impact
- Privilege Gain
- Component
- Network Service
- Class
- Authentication Bypass
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The canonicalize_username function in svnserve/cyrus_auth.c performs a prefix match on the realm string during Cyrus SASL authentication, allowing an attacker-supplied realm that is a prefix of the expected repository realm to succeed and grant unintended access.
Why it matters to the business
Attackers can gain unauthorized read or write access to version-controlled repositories, risking exposure or tampering of source code and intellectual property; the flaw affects systems still running vulnerable Subversion versions with SASL enabled and carries elevated urgency due to its age and public knowledge.
How an attack unfolds
An attacker connects to an svnserve instance configured for Cyrus SASL, supplies a crafted realm string that matches only a prefix of the legitimate repository realm, and obtains an authenticated session that bypasses intended access controls without needing valid credentials.
How to fix it
Upgrade Apache Subversion to 1.8.16 or 1.9.4 or later; for helm-fips (Chainguard) apply the fixed package version 0 or later that bundles the corrected Subversion libraries.
How to confirm the fix worked
Verify the installed Subversion version is at least 1.8.16 or 1.9.4; test authentication with a non-matching prefix realm and confirm it is rejected; review SASL configuration to ensure realm strings are not relying on prefix semantics.
Typical attack path
- Identify svnserve instances advertising Cyrus SASL authentication
- Craft a connection request containing a realm string that is a prefix of the target repository realm
- Complete SASL authentication using the prefix match
- Perform Subversion operations (checkout, commit, etc.) under the unauthorized identity
How to detect it
Review svnserve and SASL logs for authentication events using realm strings that do not exactly match configured repository realms; look for successful commits or checkouts from unexpected client identities shortly after SASL negotiation.
What your security team should do
- Immediately inventory all Subversion deployments and confirm Cyrus SASL usage
- Prioritize upgrade of any instance running versions prior to 1.8.16 or 1.9.4
- Disable Cyrus SASL or switch to alternative authentication mechanisms until patches are applied
- Monitor vendor advisories for downstream packages such as helm-fips
The record
The canonicalize_username function in svnserve/cyrus_auth.c in Apache Subversion before 1.8.16 and 1.9.x before 1.9.4, when Cyrus SASL authentication is used, allows remote attackers to authenticate and bypass intended access restrictions via a realm string that is a prefix of an expected repository realm string.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Debian:11 | subversion | 0 | 1.9.4-1 |
| Debian:12 | subversion | 0 | 1.9.4-1 |
| Debian:13 | subversion | 0 | 1.9.4-1 |
| Debian:7 | subversion | 0 | 1.6.17dfsg-4+deb7u11 |
| Debian:8 | subversion | 0 | 1.8.10-6+deb8u4 |
| Mageia:5 | subversion | 0 | 1.8.16-1.mga5 |
| SUSE:Linux Enterprise Software Development Kit 11 SP4 | subversion | 0 | 1.6.17-1.35.1 |
| SUSE:Linux Enterprise Software Development Kit 12 | subversion | 0 | 1.8.10-21.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP1 | subversion | 0 | 1.8.10-21.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP2 | subversion | 0 | 1.8.19-25.3.1 |
| SUSE:Linux Enterprise Software Development Kit 12 SP3 | subversion | 0 | 1.8.19-25.3.1 |
| SUSE:Studio Onsite 1.3 | subversion | 0 | 1.6.17-1.35.1 |
| Ubuntu:14.04:LTS | subversion | 0 | 1.8.8-1ubuntu3.3 |
| Ubuntu:16.04:LTS | subversion | 0 | 1.9.3-2ubuntu1.1 |
| openSUSE:Tumbleweed | subversion | 0 | 1.9.5-1.1 |
Related vulnerabilities
- CVE-2024-46901 Insufficient validation of filenames against control characters in Apache Subversion… Also affects subversion
- CVE-2017-9800 A maliciously constructed svn+ssh:// URL would cause Subversion clients before 1.8.19… Also affects subversion
- CVE-2016-2168 The req_check_access function in the mod_authz_svn module in the httpd server in Apache… Also affects subversion
- CVE-2015-5343 Integer overflow in util.c in mod_dav_svn in Apache Subversion 1.7.x, 1.8.x before… Also affects subversion
- CVE-2015-5259 Integer overflow in the read_string function in libsvn_ra_svn/marshal.c in Apache… Also affects subversion
- CVE-2015-0248 The (1) mod_dav_svn and (2) svnserve servers in Subversion 1.6.0 through 1.7.19 and 1.8.0… Also affects subversion
- CVE-2014-3580 The mod_dav_svn Apache HTTPD server module in Apache Subversion 1.x before 1.7.19 and… Also affects subversion
- CVE-2014-0032 The get_resource function in repos.c in the mod_dav_svn module in Apache Subversion… Also affects subversion