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

Query text parameter not sanitized #3951

Closed
gneissone opened this issue Mar 11, 2024 · 0 comments · Fixed by #3952 or vivo-project/Vitro#447
Closed

Query text parameter not sanitized #3951

gneissone opened this issue Mar 11, 2024 · 0 comments · Fixed by #3952 or vivo-project/Vitro#447
Assignees
Milestone

Comments

@gneissone
Copy link
Member

gneissone commented Mar 11, 2024

Describe the bug
This got flagged by a security scanning application as a potential vulnerability. Pagination in search results is handled via URL parameters and javascript. The input is not sanitized, however, so a bad actor could execute something via the VIVO site's domain.

To Reproduce
For example, try this path on any VIVO running the latest code:
{vivo url}/search?querytext=</script><script>alert("uh%20oh");</script>

Expected behavior
The arbitrary javascript passed via the URL should not be executed

Screenshots
Screenshot 2024-03-11 at 12 53 57

Environment (please complete the following information):

  • Browser: Chrome
  • Tomcat version: 9.0.78
  • VIVO version: 1.14.1-SNAPSHOT
  • Apache Solr 9.3.0

Additional context
https://github.com/vivo-project/Vitro/blob/03517df59ab02108f81f19d8ff383e20f9c556ca/webapp/src/main/webapp/templates/freemarker/body/search/search-pagedResults.ftl#L55

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