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

Potential XSS vulnerability in tep_draw_input_field (html_output.php) #642

Open
h86 opened this issue Jun 7, 2019 · 0 comments
Open

Potential XSS vulnerability in tep_draw_input_field (html_output.php) #642

h86 opened this issue Jun 7, 2019 · 0 comments

Comments

@h86
Copy link

h86 commented Jun 7, 2019

In html_output, the function tep_draw_input_field uses tep_output_string($value) to write a user-chosen string to the value-attribute of an input field. tep_output_string translates " to " but < and > are not translated.

Applied to the search field, this has the effect that for example <script> remains unencoded in the value. The encoded quotation mark ensures this is not immediately useable for XSS, but still it is unfortunate.

Example:
https://demo.oscommerce.com/advanced_search.php?keywords=%22%3E%3Cscript%3Ealert%281%29%3B%3C%2Fscript%3E&search_in_description=1

Kudos to https://www.openbugbounty.org/researchers/AndreCalvinho/ for giving hints about the issue.

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