diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-04-10 16:35:30 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-04-10 16:35:30 -0400 |
commit | 72b5ef2c5fb01751992c9400afe2690da5df611f (patch) | |
tree | 3a7aab2bc11e330e9e73164e438f01afa3846141 /doc/security.mdwn | |
parent | 609e74bbd83925d2eea797a64620a20f57df75a5 (diff) | |
download | ikiwiki-72b5ef2c5fb01751992c9400afe2690da5df611f.tar ikiwiki-72b5ef2c5fb01751992c9400afe2690da5df611f.tar.gz |
Fix CSRF attacks against the preferences and edit forms. Closes: #475445
The fix involved embedding the session id in the forms, and not allowing the
forms to be submitted if the embedded id does not match the session id.
In the case of the preferences form, if the session id is not embedded,
then the CGI parameters are cleared. This avoids a secondary attack where the
link to the preferences form prefills password or other fields, and
the user hits "submit" without noticing these prefilled values.
In the case of the editpage form, the anonok plugin can allow anyone to edit,
and so I chose not to guard against CSRF attacks against users who are not
logged in. Otherwise, it also embeds the session id and checks it.
For page editing, I assume that the user will notice if content or commit
message is changed because of CGI parameters, and won't blndly hit save page.
So I didn't block those CGI paramters. (It's even possible to use those CGI
parameters, for good, not for evil, I guess..)
The only other CSRF attack I can think of in ikiwiki involves the poll plugin.
It's certianly possible to set up a link that causes the user to unknowingly
vote in a poll. However, the poll plugin is not intended to be used for things
that people would want to attack, since anyone can after all edit the poll page
and fill in any values they like. So this "attack" is ignorable.
Diffstat (limited to 'doc/security.mdwn')
-rw-r--r-- | doc/security.mdwn | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/security.mdwn b/doc/security.mdwn index 373f64557..29ae7d4b3 100644 --- a/doc/security.mdwn +++ b/doc/security.mdwn @@ -366,3 +366,14 @@ with the release of ikiwiki 2.31.1. (And a few subsequent versions..) A fix was also backported to Debian etch, as version 1.33.4. I recommend upgrading to one of these versions if your wiki can be edited by third parties. + +## Cross Site Request Forging + +Cross Site Request Forging could be used to constuct a link that would +change a logged-in user's password or other preferences if they clicked on +the link. It could also be used to construct a link that would cause a wiki +page to be modified by a logged-in user. + +These holes were discovered on 10 April 2008 and fixed the same day with +the release of ikiwiki 2.42. A fix was also backported to Debian etch, as +version 1.33.4. I recommend upgrading to one of these versions. |