Cross Site Scripting Possibility

Bug #1407135 reported by Amit Gandhi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Poppy
Fix Released
High
Amit Gandhi

Bug Description

Many fields of the API accept inputs commonly used in XSS attacks. This can create a vulnerability within any consuming UI.

All user input should be validated for its expected type, range, format and length.

Fields affected:
name:
domains: domain
origins: origin
caching: name
caching: rules: request_url
caching: rules: name

EXAMPLE:

1. REQUEST (caching: name):
POST /v1.0/services HTTP/1.1

{"domains": [{"domain": "mywebsite.com"}], "caching": [{"name": "default", "ttl": 3600}, {"rules": [{"request_url": "/index.htm", "name": "index"}], "name": "<SCRIPT SRC=http://ha.ckers.org/xss.js></SCRIPT>", "ttl": 1200}], "name": "shortname", "origins": [{"origin": "mywebsite1.com", "ssl": false, "port": 443}], "flavor_id": "cdn"}

3. REQUEST:
GET /v1.0/services/shortname HTTP/1.1

4. RESPONSE:
HTTP/1.1 200 OK

{"name": "shortname", "domains": [{"domain": "mywebsite.com", "protocol": "http"}], "origins": [{"origin": "mywebsite1.com", "port": 443, "ssl": false, "rules": []}], "restrictions": [], "caching": [{"name": "default", "ttl": 3600}, {"name": "<SCRIPT SRC=http://ha.ckers.org/xss.js></SCRIPT>", "ttl": 1200, "rules": [{"name": "index", "request_url": "/index.htm"}]}], "status": "deployed", "flavor_id": "cdn", "errors": [], "links": [{"href": "https://preview.cdn.api.rackspacecloud.com/v1.0/services/shortname", "rel": "self"}, {"href": "https://preview.cdn.api.rackspacecloud.com/v1.0/flavors/cdn", "rel": "flavor"}, {"href": "mywebsite.com.cdn17.altcdn.com", "rel": "access_url"}]}

Revision history for this message
Amit Gandhi (amit-gandhi) wrote :
Changed in poppy:
status: Confirmed → Fix Committed
Changed in poppy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.