couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Kowalski (JIRA)" <>
Subject [jira] [Commented] (COUCHDB-2232) Escape HTML when rendering XSS targets
Date Sun, 04 May 2014 12:19:16 GMT


Robert Kowalski commented on COUCHDB-2232:

We (Sue, Garren, Me) agreed that we just use <- as default in the future wherever it makes

The change was picked into the 1.6.x branch.

Follow up ticket with more fixes: COUCHDB-2233

> Escape HTML when rendering XSS targets
> --------------------------------------
>                 Key: COUCHDB-2232
>                 URL:
>             Project: CouchDB
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Fauxton
>            Reporter: Kyle Snavely
>            Assignee: Robert Kowalski
> XSS payloads such as '\"><img src=%3Dx onerror%3Dprompt(%2Fxss%2F)>' can be
used with malicious intent in documents.
> When rendered unescaped in Fauxton the JS is executed. To reproduce, use the above string
as a new document ID in Fauxton.
> This affects the _id field of documents, normal, ddoc, replicator docs...
> Other rendered data may be affected. I noticed I can create couch users with the above
string as a name.
> I have a branch with basic fixes, using <%- in place of <%= where appropriate in
templates. I'm still getting my Fauxton dev stack set back up so I haven't yet run the tests
or inspected things locally.
> I am not familiar with the codebase but I'd like to point out the possible sore spots.
Branch notes:
>   -
>   - I tried to not be super heavy handed, only using <%- for values that
>     could be set with XSS payloads or otherwise come from a user/data.
>   - There are a few spots where I wasn't sure:
>       -- src/fauxton/app/addons/config/templates/item.html
>       -- src/fauxton/app/addons/documents/templates/changes.html
>   - Perhaps safeURLName can escape on <, > as well?
>       --
> I'll do another run through looking for '<%=' and updating as appropriate.

This message was sent by Atlassian JIRA

View raw message