Bug 1105560 - CVE-2014-3995 python-djblets: XSS Vulnerability in Djblets gravatar templates [fedora-all]
Summary: CVE-2014-3995 python-djblets: XSS Vulnerability in Djblets gravatar templates...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-djblets
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Stephen Gallagher
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1105551
Blocks: CVE-2014-3995
TreeView+ depends on / blocked
 
Reported: 2014-06-06 11:54 UTC by Stephen Gallagher
Modified: 2014-06-17 23:26 UTC (History)
1 user (show)

Fixed In Version: python-djblets-0.7.30-2.fc19
Clone Of:
Environment:
Last Closed: 2014-06-17 23:24:15 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Stephen Gallagher 2014-06-06 11:54:35 UTC
Description of problem:
The generated gravatar HTML wasn't handling escaping of the display name
of the user, allowing an attacker to choose a name that would close out
the <img> tag and inject a <script> tag.

By switching to Django's format_html(), we can guarantee safe escaping
of content.

Version-Release number of selected component (if applicable):
python-djblets-0.8.2-1.fc21
python-djblets-0.7.29-1.fc20

How reproducible:
Every time

Steps to Reproduce:
1. User can change their display name to "</script><script> alert(1)</script>"
2. Configure this user for a Gravatar image
3. Browse to any page displaying the gravatar image

Actual results:
The script executes

Expected results:
The username should be properly sanitized and prevent XSS execution.

Additional info:
Issue is non-public, but was discovered during further investigation around the public bug in BZ #1105551

Credit for the discovery of this vulnerability should be given to Christian Hammond of Bean Bag, Inc. (author of Review Board).

This issue is present in the python-djblets package on Fedora 19, 20, Rawhide and EPEL 6 (EPEL 7 has not yet had a successful build).

Upstream patch:
Djblets 0.7.x: https://reviews.reviewboard.org/r/5947/diff/
Djblets 0.8.x: https://reviews.reviewboard.org/r/5946/diff/

Comment 1 Stephen Gallagher 2014-06-06 11:56:13 UTC
Upstream has requested CVEs be issued for this and BZ #1105551. My personal opinion is that they can probably be treated as a single CVE.

Comment 4 Fedora Update System 2014-06-09 19:43:51 UTC
python-djblets-0.7.30-2.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/python-djblets-0.7.30-2.fc20

Comment 5 Fedora Update System 2014-06-09 19:44:01 UTC
python-djblets-0.7.30-2.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/python-djblets-0.7.30-2.fc19

Comment 6 Fedora Update System 2014-06-10 03:13:14 UTC
Package python-djblets-0.7.30-2.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing python-djblets-0.7.30-2.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-7223/python-djblets-0.7.30-2.fc20
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2014-06-17 23:24:15 UTC
python-djblets-0.7.30-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2014-06-17 23:26:22 UTC
python-djblets-0.7.30-2.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.