Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack of HTTP Security Headers in 500 HTTP response when JWT for error parameter is corrupted #377

Open
claudijd opened this issue Apr 16, 2019 · 0 comments

Comments

@claudijd
Copy link
Contributor

claudijd commented Apr 16, 2019

I was doing some testing on the SSO dashboard and was playing with corrupting the JWT passed into the /forbidden?error=JWT_PLACEHOLDER on sso dashboard and noticed that when I corrupt the JWT (simply by deleting a trailing piece of it) I can generate a 500 response, which seems appropriate, but I noted that that 500 response does not contain the relevant HTTP Security Headers, like CSP headers. This could be used as a future by an attacker if say the 500 page became configurable and accepted user input to display a richer response to the user or in some other similar chained vulnerability to exploit the dashboard.

REQUEST
GET /forbidden?error=REDACTED(original, with a trailing piece deleted)&state=REDACTED HTTP/1.1
Host: sso.mozilla.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:67.0) Gecko/20100101 Firefox/67.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: https://github.com/
Connection: close
Cookie: _ga=GA1.3.225014566.1530649067
Upgrade-Insecure-Requests: 1

RESPONSE
HTTP/1.1 500 Internal Server Error
Server: nginx/1.15.10
Date: Tue, 16 Apr 2019 13:52:59 GMT
Content-Type: text/html
Content-Length: 141
Connection: close
Strict-Transport-Security: max-age=15724800; includeSubDomains

<title>Internal Server Error</title>

Internal Server Error

Recommendation: All pages should serve relevant security headers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant