Skip to content

fix: reject spoofed URL objects with non-string toString() result#217

Open
redonkulus wants to merge 1 commit intomainfrom
fix/url-tostring-spoofing
Open

fix: reject spoofed URL objects with non-string toString() result#217
redonkulus wants to merge 1 commit intomainfrom
fix/url-tostring-spoofing

Conversation

@redonkulus
Copy link
Copy Markdown
Collaborator

Validates that URL.toString() returns a primitive string before passing to serialize(), preventing code injection via Object.create(URL.prototype) spoofing. Adds a regression test covering the attack vector from PSECBUGS-108653.

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

Validates that URL.toString() returns a primitive string before
passing to serialize(), preventing code injection via Object.create(URL.prototype)
spoofing. Adds a regression test covering the attack vector from PSECBUGS-108653.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@redonkulus redonkulus requested a review from okuryu April 24, 2026 19:56
@okuryu
Copy link
Copy Markdown
Collaborator

okuryu commented Apr 24, 2026

GitHub Actions is currently failing—can you help me fix it? I sent an email to ospo@yahooinc.com last week, but I haven't heard back and I'm really stuck.

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