Skip to content

Conversation

@ljharb
Copy link

@ljharb ljharb commented Jan 23, 2026

Updates

  • Affected products

Comments
Following up on #6697, turns out none of the v0 versions are affected.

  • v0.0.x: Uses Node.js built-in url.parse which handles trailing colons correctly
  • v0.1.x - v0.2.x: Uses a monolithic regex where the port pattern (?::([0-9]+))? makes the entire :port group optional, so when there's no port number, the colon is not consumed into the hostname

The vulnerability only affects v1.0.0 and later, where the rules array approach processes the port separately after setting the host, and the /:(\d+)$/ pattern requires at least one digit, leaving the trailing colon in the hostname when no digits follow.

Copilot AI review requested due to automatic review settings January 23, 2026 19:57
@github-actions github-actions bot changed the base branch from main to ljharb/advisory-improvement-6699 January 23, 2026 19:58
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the security advisory GHSA-pv4c-p2j5-38j4 for the url-parse npm package to correct the version range affected by an Open Redirect vulnerability. Based on deeper analysis following PR #6697, the vulnerability was determined to only affect versions starting from 1.0.0, not 0.1.0 as previously recorded. Versions 0.0.x through 0.2.x use different parsing mechanisms that handle URLs correctly.

Changes:

  • Updated the "introduced" version from "0.1.0" to "1.0.0" to accurately reflect that only versions 1.0.0 through 1.4.2 are vulnerable
  • Updated the "modified" timestamp to reflect the current modification time

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"events": [
{
"introduced": "0.1.0"
"introduced": "1.0.0"
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reference URL at line 61 comparing versions 0.0.4...0.1.0 is now misleading after changing the introduced version to 1.0.0. According to the PR description, versions 0.1.x through 0.2.x were not vulnerable. This reference should be removed or updated to reflect the actual version where the vulnerability was introduced (1.0.0), or provide context explaining why this comparison is still relevant despite the version change.

Copilot uses AI. Check for mistakes.
@advisory-database advisory-database bot merged commit 3c566ed into ljharb/advisory-improvement-6699 Jan 23, 2026
9 of 10 checks passed
@advisory-database
Copy link
Contributor

Hi @ljharb! Thank you so much for contributing to the GitHub Advisory Database. This database is free, open, and accessible to all, and it's people like you who make it great. Thanks for choosing to help others. We hope you send in more contributions in the future!

@advisory-database advisory-database bot deleted the ljharb-GHSA-pv4c-p2j5-38j4 branch January 23, 2026 20:11
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

Successfully merging this pull request may close these issues.

2 participants