Summary: ========
Subversion's moddavsvn server allows setting arbitrary svn:author property values when committing new revisions. This can be accomplished using a specially crafted sequence of requests. An evil-doer can fake svn:author values on his commits. However, as authorization rules are applied to the evil-doer's true username, forged svn:author values can only happen on commits that touch the paths the evil-doer has write access to.
Doing so does not grant any additional access and does not circumvent the standard Apache authentication or authorization mechanisms. Still, an ability to spoof svn:author property values can impact data integrity in environments that rely on these values.
There are no known instances of the problem being exploited in the wild, but an exploit has been tested.
Details: ========
The Subversion http://-based protocol used for communicating with a Subversion moddavsvn server has two versions, v1 and v2. The v2 protocol was added in Subversion 1.7.0, but the server allows using both protocol versions for compatibility reasons. When a commit happens, the client sends a sequence of requests (POST, PUT, MERGE, etc.) that depend on the negotiated protocol version.
Usually, a server uses the name of the authenticated user as the svn:author value for a new revision. However, with a specially handcrafted v1 request sequence, a client can instruct the server to use the svn:author property that she/he provided. In this case, the server will use an arbitrary value coming from the client instead of the svn:author value originating from the authentication mechanism.
Severity: =========
CVSSv2 Base Score: 3.5 CVSSv2 Base Vector: AV:N/AC:M/Au:S/C:N/I:P/A:N
We consider this to be a medium risk vulnerability.
An attacker needs to have commit access to the repository to exploit the vulnerability. The ability to spoof svn:author property values can impact data integrity in environments that expect the values to denote the actual commit author. The real ID of the author could still be determined using server access logs. However, it is also possible that a spoofed change could go in unnoticed.
Subversion's repository hooks might see the real ID of the author or the forged value, depending on the hook type and the hook contents:
- A start-commit hook will see the real username in the USER argument - A start-commit hook will see the real username when performing 'svnlook propget --revprop -t TXNNAME' - A pre-commit hook will see the forged username when performing 'svnlook propget --revprop -t TXNNAME' - A post-commit hook will see the forged username when performing 'svnlook propget --revprop -r REV'
Unfortunately, no special configuration is required and all moddavsvn servers are vulnerable.
Recommendations: ================
No workaround is available.
Acknowledgements:
Red Hat would like to thank the Apache Software Foundation for reporting this issue. Upstream acknowledges Evgeny Kotkov of VisualSVN as the original reporter.
A NULL pointer dereference flaw was found in the way moddavsvn handled URIs for virtual transaction names. A remote, unauthenticated attacker could send a request for a virtual transaction name that does not exist, causing moddavsvn to crash.
Versions 1.7.0 up to and including 1.7.18, and 1.8.0 up to and including 1.8.10, are affected.
This issue will be fixed in versions 1.7.19 and 1.8.11.
Acknowledgements:
Red Hat would like to thank the Subversion project for reporting this issue. Upstream acknowledges Evgeny Kotkov of VisualSVN as the original reporter.
A NULL pointer dereference flaw was found in the way moddavsvn handled REPORT requests. A remote, unauthenticated attacker could use a crafted REPORT request to crash moddavsvn.
Versions 1.0.0 up to and including 1.7.18, and 1.8.0 up to and including 1.8.10, are affected.
This issue will be fixed in versions 1.7.19 and 1.8.11.
Acknowledgements:
Red Hat would like to thank the Subversion project for reporting this issue. Upstream acknowledges Evgeny Kotkov of VisualSVN as the original reporter.
A possible MD5 collision issue was found in the way Subversion handled cached credentials. If an attacker could trick a victim into connecting to their Subversion server, they could send a specially-crafted realm string to the victim that could trigger an MD5 collision. This could lead to the Subversion client sending another realm's credentials to the attacker's server.
Upstream patches:
http://svn.apache.org/r1550691 http://svn.apache.org/r1550772
References:
http://mail-archives.apache.org/modmbox/subversion-dev/201406.mbox/%3C53915FD8.7050600@reser.org%3E
An unintended file contents disclosure flaw was found in the way moddavsvn module of the subversion concurrent version control system processed certain URLs, when path-access control for files and directories was enabled. A remote attacker could use this flaw to obtain information, which should be otherwise prohibited by the authorization subsystem.
Acknowledgements:
Red Hat would like to thank the Apache Subversion project for reporting this issue. Upstream acknowledges Kamesh Jayachandran of CollabNet, Inc. as the original reporter.
An infinite loop was found in the way moddavsvn module of the subversion concurrent version control system processed certain data sets, when SVNPathAuthz configuration directive with value of 'shortcircuit' was used. A remote attacker could use this flaw to cause the httpd child process to consume excessive amount of system memory.
Acknowledgements:
Red Hat would like to thank the Apache Subversion project for reporting this issue. Upstream acknowledges Ivan Zhakov of VisualSVN as the original reporter.
A NULL pointer dereference flaw was found in the way moddavsvn, Apache httpd module for Subversion server, processed requests to lock working copy paths in the repository, when particular Subversion client, requesting the lock, was not previously authenticated to the Subversion server. A remote attacker could use this flaw to cause a denial of service (crash of particular httpd thread, serving the request).
Acknowledgements:
Red Hat would like to thank Hyrum Wright of the Apache Subversion project for reporting this issue. Upstream acknowledges Philip Martin, WANdisco, Inc. as the original reporter.
A server-side memory leak in Subversion before v1.6.15 allowed remote attackers to cause a denial of service (memory consumption and daemon outage or crash) via Subversion client "blame" or "log" operations performed on certain repository files, when the -g option (request to display additional merge history for the file) was used.
References: [1] http://svn.haxx.se/dev/archive-2010-11/0102.shtml [2] http://svn.apache.org/repos/asf/subversion/tags/1.6.15/CHANGES
Upstream changeset: [3] http://svn.apache.org/viewvc?view=revision&revision=1032808
Public PoC: [4] http://svn.haxx.se/dev/archive-2010-11/0163.shtml
A NULL pointer dereference flaw was found in the way moddavsvn, Apache httpd module for Subversion server, processed certain requests to display collection of Subversion repositories, available on particular host, when listing of repositories (SVNListParentPath directive) was enabled. A remote user could use this flaw to cause denial of service (particular httpd thread crash).
References: [1] http://svn.apache.org/repos/asf/subversion/tags/1.6.15/CHANGES
Upstream changeset: [2] http://svn.apache.org/viewvc?view=revision&revision=1033166
Public PoC: [3] http://svn.haxx.se/users/archive-2010-11/0084.shtml
Flaw exploitation note: ----------------------- This flaw to be successfully exploited requires the "SVNListParentPath" directive / listing of repositories to be enabled. This feature is turned off by default in versions of subversion package, as shipped with Red Hat Enterprise Linux 5 and 6, which prevents occurrence / exploitation of this flaw.