fix(deps): update module github.com/gorilla/schema to v1.4.1 [security]#401
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
fix(deps): update module github.com/gorilla/schema to v1.4.1 [security]#401renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v1.2.0→v1.4.1GitHub Vulnerability Alerts
CVE-2024-37298
Details
Running
schema.Decoder.Decode()on a struct that has a field of type[]struct{...}opens it up to malicious attacks regarding memory allocations, taking advantage of the sparse slice functionality. For instance, in the Proof of Concept written below, someone can specify to set a field of the billionth element and it will allocate all other elements before it in the slice.In the local environment environment for my project, I was able to call an endpoint like
/innocent_endpoint?arr.10000000.X=1and freeze my system from the memory allocation while parsingr.Form. I think this line is responsible for allocating the slice, although I haven't tested to make sure, so it's just an educated guess.Proof of Concept
The following proof of concept works on both v1.2.0 and v1.2.1. I have not tested earlier versions.
Impact
Any use of
schema.Decoder.Decode()on a struct with arrays of other structs could be vulnerable to this memory exhaustion vulnerability. There seems to be no possible solution that a developer using this library can do to disable this behaviour without fixing it in this project, so all uses of Decode that fall under this umbrella are affected. A fix that doesn't require a major change may also be harder to find, since it could break compatibility with some other intended use-cases.Release Notes
gorilla/schema (github.com/gorilla/schema)
v1.4.1Compare Source
Security Release
Fixes an issue where sparse slice deserialization can cause memory exhaustion CVE-2024-37298
Thanks to @AlexVasiluta for the report and following responsible disclosure.
Full Changelog: gorilla/schema@v1.4.0...v1.4.1
v1.4.0Compare Source
What's Changed
New Contributors
Full Changelog: gorilla/schema@v1.3.0...v1.3.1
v1.3.0Compare Source
What's Changed
New Contributors
Full Changelog: gorilla/schema@v1.2.1...v1.3.0
v1.2.1Compare Source
What's Changed
New Contributors
Full Changelog: gorilla/schema@v1.2.0...v1.2.1
Configuration
📅 Schedule: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.