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

Javascript Injection possible #152

Open
dommar04 opened this issue Oct 13, 2016 · 9 comments
Open

Javascript Injection possible #152

dommar04 opened this issue Oct 13, 2016 · 9 comments

Comments

@dommar04
Copy link

The image.php is vulnerable to Cross-Site Scripting
Example:
..../extensions/jit_image_manipulation/lib/image.php?param=%3Cscript%3Ealert%28%27XSS%27%29%3C/script%3E

@michael-e
Copy link
Member

It is considered good practice to send vulnerability reports to [email protected] directly. (So these issues can be solved before being published.) But I admit, it is not documented anywhere.

Can you tell which version of JIT you are using? Version 2, maybe? (With JIT 1.43 the response I get is Image /workspace/ could not be found.)

@DavidOliver
Copy link
Member

DavidOliver commented Oct 13, 2016

Script injection working for me in JIT 1.44, if dynamic URLs are allowed. On initial load, Image /workspace/' is shown as body content and the browser alert is shown. After clicking the button in the browser alert, the Image /workspace/ could not be found. body content is loaded.

Should this issue be deleted while a fix is created? I don't have any more recent installations of JIT to test at the moment.

@dommar04
Copy link
Author

Im using JIT 1.44.

You can delete the ticket if you like

@michael-e
Copy link
Member

I am afraid that I can not delete an issue. Maybe it's not possible at all. @nitriques will know.

@nitriques
Copy link
Member

I am afraid that I can not delete an issue.

Yes we could. But that's too late.

@michael-e I've been dying to add a block direct php access in the .htaccess for quite sometimes. That's the 3rd time it would have prevented XSS...

It's not reproducible with 2.x.x because of the renderer. But yeah I can confirm that it's working under 1.44.

I think I need to fix it....

nitriques added a commit that referenced this issue Oct 27, 2016
XSS is a nasty hack, we always need to sanitize user input.

Fixes #152
@nitriques
Copy link
Member

A fix is available as version 1.46, see https://github.com/symphonycms/jit_image_manipulation/releases/tag/1.46.

@nitriques
Copy link
Member

nitriques commented Oct 27, 2016

@dommar04 Can you

  1. Confirm that 1.46 solves the issue.
  2. Confirm that version 2.0.0 is un-affected. (i.e. /image/1/100/0/<script>alert%28%27XSS%27%29</script>)

Thanks for reporting. As @michael-e said, please write to [email protected]

@michael-e I've documented it https://github.com/symphonycms/symphony-2/wiki/Security-Bug-Disclosure

@michael-e
Copy link
Member

Great!

@dommar04
Copy link
Author

Yes it works in 1.46 and does not occour in 2.0.0

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

No branches or pull requests

4 participants