20171128

Several XSS and redirect fixes, and a sandbox escape fix.

Available downloads

PloneHotfix20171128-1.0.zip

MD5: 249ff23b28b677ff1e4a933b441e5919
SHA1: 06b521548429fd064194f32f86e2930dc2062136
For all platforms (6057 bytes)

Plone affected versions

  • 5.1rc1
  • 5.1b4
  • 5.1b3
  • 5.1b2
  • 5.1a2
  • 5.1a1
  • 5.0.9
  • 5.0.8
  • 5.0.7
  • 5.0.6
  • 5.0.5
  • 5.0.4
  • 5.0.3
  • 5.0.2
  • 5.0.1
  • 5.0
  • 5.0rc3
  • 5.0rc2
  • 5.0rc1
  • 4.3.15
  • 4.3.14
  • 4.3.12
  • 4.3.11
  • 4.3.10
  • 4.3.9
  • 4.3.8
  • 4.3.7
  • 4.3.6
  • 4.3.5
  • 4.3.4
  • 4.3.3
  • 4.3.2
  • 4.3.1
  • 4.3
  • 4.2.7
  • 4.2.6
  • 4.2.5
  • 4.2.4
  • 4.2.3
  • 4.2.2
  • 4.2.1
  • 4.2
  • 4.1.6
  • 4.1.5
  • 4.1.4
  • 4.1.3
  • 4.1.2
  • 4.1.1
  • 4.1
  • 4.0.10
  • 4.0.9
  • 4.0.8
  • 4.0.7
  • 4.0.5
  • 4.0.4
  • 4.0.3
  • 4.0.2
  • 4.0.1
  • 4.0
  • 3.3.6
  • 3.3.5
  • 3.3.4
  • 3.3.3
  • 3.3.2
  • 3.3.1
  • 3.3
  • 2.5.5

Release Notes

CVE numbers: not yet issued.

Versions Affected: All supported Plone versions (4.3.15 and any earlier 4.x version, 5.0.9 and any earlier 5.x version). Previous versions could be affected but have not been fully tested.

Versions Not Affected: None.

Nature of vulnerability:

The patch will address several security issues:

  • An open redirection and reflected Cross Site Scripting attack (XSS) on the login form and possibly other places where redirects are done. The isURLInPortal check that is done to avoid linking to an external site could be tricked into accepting malicious links.
  • An open redirection when calling a specific url.
  • Cross Site Scripting using the home_page member property.
  • Accessing private content via str.format in through-the-web templates and scripts. See this blog post by Armin Ronacher for the general idea. This improves an earlier hotfix. Since the format method was introduced in Python 2.6, this part of the hotfix is only relevant for Plone 4 and 5, not Plone 3.

Version support: The hotfix is officially supported by the Plone security team on the following versions of Plone in accordance with the Plone version support policy: 4.0.10, 4.1.6, 4.2.7, 4.3.15 and 5.0.9. However, it has also received some testing on older versions of Plone.

The fixes included here will be incorporated into subsequent releases of Plone, so Plone 4.3.16, 5.0.10 and greater should not require this hotfix. 

Warning: Technically, the hotfix should work on Plone 3, although the str.format part is not necessary there. But it gets ever more difficult to test, because the outdated and unsupported Python version 2.4 is needed. More and more parts required during installation of Plone (buildout, setuptools) just don't work anymore with Python 2.4. Getting compatible versions installed and running is tough, and may be impossible unless you are an expert. If you are using Plone 3 and Python 2.4 you need to upgrade soon. Plone 3 was already officially unsupported, but now the Plone Security Team is really giving up.

Credit: Thanks to Zhouyuan Yang at Fortinet's FortiGuard Labs, Jayson Grace at Sandia National Laboratories and Michael Howitz at Gocept for reporting the issues, next to one found by the Plone Security Team itself. Thanks to Michael Howitz for providing the fix for the issue he found. The rest of the issues were fixed by the Plone Security Team.

Installation instructions

The procedure for installing Hotfix 20171128 differs slightly based on which version of Plone or Zope you are running, and whether you installed Plone or Zope using buildout.

Backup First!

It is prudent to backup all your data and installation files before installing any Plone add-on, including this hotfix.  If you already have a solid Plone backup routine in place, then you can skip this step and proceed.

If you don't already have a backup of your Plone site, the simplest way to back up your Plone instance is to simply copy your entire Zope instance folder or buildout folder to a secure location.

Recommended Install Procedure

If you're less experienced with Plone, the easiest way to install Hotfix 20171128 on Plone 4.0 - Plone 5.x is as follows:

1) Download the hotfix archive using the link above.  If you have an md5 tool available (Linux or Mac), use it to check that the signature matches.

2) Place the downloaded zip file into the "products" directory in your Zope instance. On pre-buildout installations, this will be "Products".

3) Unpack the zip file.

On Linux or Mac, the command is:

 $ unzip PloneHotfix20171128-1.0.zip

On Windows, use your favorite archiving product. (7Zip is a good choice).

4)  Restart your Zope instance in foreground mode to ensure that the hotfix is installed.

On Mac or Linux, the command is typically:

 $ bin/instance fg

On Windows, the command is typically:

> bin\instance.exe fg

Zope will start in the foreground, and you should see the message "INFO PloneHotfix20171128 Hotfix installed." during startup.

5) Stop the foreground instance of Zope by hitting CTRL-C

6) Restart your Zope instance.

On Mac or Linux, the command is typically:

$ bin/instance start

On Windows, the command is typically:

> bin\instance.exe start

If you're using ZEO clients, change instance to client1, client2, etc., in the above commands.

 

Installing with Buildout

If you are an experienced Plone administrator, and you are using a buildout-based installation of Plone, you may choose to install Hotfix 20171128 with buildout. However, if you choose to do this, you must be certain that you will not accidentally overwrite Plone components with newer versions.  This is particularly likely if you try to use buildout with older versions of Plone.

If you are not sure what you're doing, please use the "Recommended Installation Instructions" above.

Unless you have a very recent buildout, you may get this error when running buildout, caused by a change to pypi.python.org serving only https:

Error: Couldn't find a distribution for 'Products.PloneHotfix20171128==1.0'.

The most likely cause is that your buildout is trying to download the hotfix via http. You should use the https PyPI index. In the buildout section of your buildout, make sure you use the correct index:

[buildout]
index = https://pypi.python.org/simple/

Very new versions of setuptools may try to install wheels as eggs, especially version 2.8 and higher. A combination of setuptools 33.1.1 and zc.buildout 2.9.5 works correctly.

1) Find your buildout.cfg file, typically located in the "zinstance" subdirectory of your Plone installation directory. (If you're using ZEO clients, the subdirectory may be called "zeoserver").

2) Open your buildout.cfg file in your text editor. 

3) Scroll down to the "eggs" section of the buildout and add Products.PloneHotfix20171128, e.g.

[buildout]
...
eggs = 
    Products.PloneHotfix20171128

[versions]
Products.PloneHotfix20171128 = 1.0

4) Rerun buildout.

On Mac or Linux, the command is:

$ ./bin/buildout -Nv

On windows, the command is:

> bin\buildout.exe -Nv

5) Restart your Zope instance.

On Mac or Linux, the command is:

$ ./bin/instance start

On Windows, the command is:

> bin\instance.exe start

Alternatively, on Windows, you may restart the Zope service via the Windows Services control panel.

If you're using ZEO clients, change instance to client1, client2, etc., in the above commands.

Confirming Installation

On startup, the hotfix will log a number of messages to the Zope event log. You can use this to confirm the patch is successfully installed. They look like this:

2017-11-28 18:54:42 INFO Products.PloneHotfix20171128 Applied in_portal patch

2017-11-28 18:54:42 INFO Products.PloneHotfix20171128 Applied redirect patch

2017-11-28 18:54:42 INFO Products.PloneHotfix20171128 Applied user_home_page patch

2017-11-28 18:54:42 INFO Products.PloneHotfix20171128 Applied strformat patch

2017-11-28 18:54:42 INFO Products.PloneHotfix20171128 Hotfix installed

 

Issues fixed