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

Enforce whitelist for sort values (CVE-2024-32231) #4865

Merged
merged 1 commit into from
May 22, 2024

Conversation

WithoutPants
Copy link
Collaborator

Fixes vulnerability to SQL injection when entering specific values into the sort URL parameter. Changes the behaviour so that sort strings are validated against a white list of values and returns an error if it is not a valid value.

Fixes CVE-2024-32231

@WithoutPants WithoutPants added the bug Something isn't working label May 22, 2024
@WithoutPants WithoutPants added this to the Version 0.26.0 milestone May 22, 2024
@WithoutPants WithoutPants merged commit 8955386 into stashapp:develop May 22, 2024
2 checks passed
@Cvrt19
Copy link

Cvrt19 commented Jun 9, 2024

Would it be possible to just add all of the possible filtering options to the list of allowed sorts? I had been using "career_length" to unofficially sort Performers by debut (by putting sort=career_length manually in the address bar) and it was working great, but this fix breaks that method. There may also be people who want to sort by "weight" or maybe even by "country."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants