]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
htmlscrubber: Security fix: In data:image/* uris, only allow a few whitelisted image... 2.53.5
authorJoey Hess <joey@gnu.kitenet.net>
Fri, 12 Mar 2010 20:20:25 +0000 (15:20 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Fri, 12 Mar 2010 20:20:25 +0000 (15:20 -0500)
IkiWiki/Plugin/htmlscrubber.pm
debian/changelog
doc/security.mdwn

index 3bdaccea119ec0e1b289a0da2f6d90e2219b8d66..9530d870834f1bf34e4f6670c2faef02fe6b63ce 100644 (file)
@@ -29,9 +29,9 @@ sub import { #{{{
                "msnim", "notes", "rsync", "secondlife", "skype", "ssh",
                "sftp", "smb", "sms", "snews", "webcal", "ymsgr",
        );
-       # data is a special case. Allow data:image/*, but
-       # disallow data:text/javascript and everything else.
-       $safe_url_regexp=qr/^(?:(?:$uri_schemes):|data:image\/|[^:]+(?:$|\/))/i;
+       # data is a special case. Allow a few data:image/ types,
+       # but disallow data:text/javascript and everything else.
+       $safe_url_regexp=qr/^(?:(?:$uri_schemes):|data:image\/(?:png|jpeg|gif)|[^:]+(?:$|\/))/i;
 } # }}}
 
 sub sanitize (@) { #{{{
index 2121f812b4bb0dfe6aa5f72fafb324b61fdbae5c..c01b697e367e3c80b1d97b93a595d745f510c0e5 100644 (file)
@@ -1,3 +1,10 @@
+ikiwiki (2.53.5) stable-security; urgency=high
+
+  * htmlscrubber: Security fix: In data:image/* uris, only allow a few
+    whitelisted image types. No svg.
+
+ -- Joey Hess <joeyh@debian.org>  Fri, 12 Mar 2010 15:19:29 -0500
+
 ikiwiki (2.53.4) stable-security; urgency=high
 
   * teximg: Replace the insufficient blacklist with the built-in security
index 403de81de8750ee0c465f674ecaac8343b206a8c..2eca735b203ec507026524989b1aa5e3f23d249b 100644 (file)
@@ -416,4 +416,27 @@ can cause it to crash. This can potentially be used for a denial of service
 attack.
 
 intrigeri discovered this problem on 12 Nov 2008 and a patch put in place
-later that day.
+later that day, in version 2.70. The fix was backported to testing as version
+2.53.3, and to stable as version 1.33.7.
+
+## Insufficient blacklisting in teximg plugin
+
+Josh Triplett discovered on 28 Aug 2009 that the teximg plugin's
+blacklisting of insecure TeX commands was insufficient; it could be
+bypassed and used to read arbitrary files. This was fixed by
+enabling TeX configuration options that disallow unsafe TeX commands.
+The fix was released on 30 Aug 2009 in version 3.1415926, and was
+backported to stable in version 2.53.4. If you use the teximg plugin,
+I recommend upgrading. ([[!cve CVE-2009-2944]])
+
+## javascript insertion via svg uris
+
+Ivan Shmakov pointed out that the htmlscrubber allowed `data:image/*` urls,
+including `data:image/svg+xml`. But svg can contain javascript, so that is
+unsafe.
+
+This hole was discovered on 12 March 2010 and fixed the same day
+with the release of ikiwiki 3.20100312.
+A fix was also backported to Debian etch, as version 2.53.5. I recommend
+upgrading to one of these versions if your wiki can be edited by third
+parties.