Skip to content

Conversation

Copy link

Copilot AI commented Jan 27, 2026

Addresses CVE-2025-11953: URLs passed to the /open-url endpoint were forwarded directly to open(), enabling command injection on Windows via shell metacharacters.

Changes

  • Add strict-url-sanitise dependency for security-focused URL validation
  • Sanitize URLs before passing to open(), rejecting malformed or malicious input with HTTP 400
  • Add test coverage for known attack vectors

Test cases

'https://www.$(calc.exe).com/foo'  // Command substitution in hostname
'https://evil.com?|calc.exe'       // Windows pipe separator
'https://example.com/?a=%¾TA%'     // Env var exfiltration (%BETA%)
Original prompt

Reattempt #2735 using the strict-url-sanitise npm package. Parsing errors should be surfaced on the HTTP endpoint and fail.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits January 27, 2026 21:01
…1953)

Co-authored-by: huntie <2547783+huntie@users.noreply.github.com>
Co-authored-by: huntie <2547783+huntie@users.noreply.github.com>
Copilot AI changed the title [WIP] Reattempt URL sanitisation using strict-url-sanitise package fix: use strict-url-sanitise to prevent RCE in openURLMiddleware Jan 27, 2026
Copilot AI requested a review from huntie January 27, 2026 21:06
Copilot AI and others added 2 commits January 27, 2026 21:11
… mock

Co-authored-by: huntie <2547783+huntie@users.noreply.github.com>
Co-authored-by: huntie <2547783+huntie@users.noreply.github.com>
Copilot AI changed the title fix: use strict-url-sanitise to prevent RCE in openURLMiddleware fix: prevent RCE via URL sanitization in openURLMiddleware Jan 27, 2026
Co-authored-by: huntie <2547783+huntie@users.noreply.github.com>
Copilot AI changed the title fix: prevent RCE via URL sanitization in openURLMiddleware fix: prevent RCE in openURLMiddleware using strict-url-sanitise Jan 27, 2026
Co-authored-by: huntie <2547783+huntie@users.noreply.github.com>
Copilot AI changed the title fix: prevent RCE in openURLMiddleware using strict-url-sanitise fix: prevent RCE in openURLMiddleware via URL sanitization Jan 27, 2026
…ltration

Co-authored-by: huntie <2547783+huntie@users.noreply.github.com>
Copilot AI changed the title fix: prevent RCE in openURLMiddleware via URL sanitization fix: prevent RCE in openURLMiddleware via strict URL sanitization Jan 27, 2026
Co-authored-by: huntie <2547783+huntie@users.noreply.github.com>
Copilot AI changed the title fix: prevent RCE in openURLMiddleware via strict URL sanitization fix: prevent RCE in openURLMiddleware via URL sanitization Jan 27, 2026
@huntie huntie marked this pull request as ready for review January 27, 2026 22:05
@huntie huntie requested a review from thymikee as a code owner January 27, 2026 22:05
@huntie
Copy link
Collaborator

huntie commented Jan 27, 2026

@thymikee Ready for review. This is a heavily steered Copilot diff!

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