[GHSA-rqff-837h-mm52] Authorization bypass in url-parse#6723
Open
ljharb wants to merge 2 commits intoljharb/advisory-improvement-6723from
Open
[GHSA-rqff-837h-mm52] Authorization bypass in url-parse#6723ljharb wants to merge 2 commits intoljharb/advisory-improvement-6723from
ljharb wants to merge 2 commits intoljharb/advisory-improvement-6723from
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request updates the security advisory GHSA-rqff-837h-mm52 for the url-parse npm package to correct the affected version range, excluding versions 0.0.0-0.0.4 which are not vulnerable to the CVE-2022-0512 authorization bypass vulnerability.
Changes:
- Updated the
modifiedtimestamp to reflect the advisory update date - Changed the
introducedversion from "0" to "0.1.0" to exclude 0.0.x versions that use Node's built-in url.parse()
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Hi @ljharb, |
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.
Updates
Comments
0.0.x versions (0.0.0 - 0.0.4) are NOT vulnerable because they use Node's built-in url.parse() instead of custom parsing logic:
Node's url.parse() correctly handles multiple @ signs by treating the last @ as the auth/host separator:
In contrast, versions 0.1.0+ use custom regex/rule-based parsing that finds the first @:
Both approaches incorrectly give hostname: 'attacker.com@example.com' instead of example.com.