Fix HTTPS proxy TLS and CONNECT target CRLF injection - #54
Merged
Conversation
Speak TLS to https:// proxy URLs before sending CONNECT so Basic proxy credentials are not written in the clear. Reject CR/LF/NUL in targetHost and require a numeric CONNECT port so request-line injection cannot bypass the existing proxyHeaders validation. Co-authored-by: ProxyMesh AI <proxymeshai@users.noreply.github.com>
proxymesh
marked this pull request as ready for review
September 1, 2026 17:20
Contributor
Author
There was a problem hiding this comment.
Left a non-blocking comment: this is not a Dependabot package-version bump, so it is outside this automation’s approval scope. Cursor Bugbot and Cursor Security Agent were not present after the first check poll; human review is needed and reviewers were assigned.
Sent by Cursor Approval Agent: dependabot approver
proxymesh
approved these changes
Sep 1, 2026
Merged
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.


Fixes the two CONNECT issues from the at-rest scan:
https://proxy URLs now usetls.connectand wait forsecureConnectbefore writing CONNECT, soProxy-Authorizationis not sent in the clear. HTTP proxies are unchanged. Adapters acceptproxyTlsOptionsfor private CAs.buildConnectRequestrejects CR/LF/NUL intargetHostand requires a numeric port in 1–65535, matching the existingproxyHeadersvalidation.Adds
npm run test:unit(test/test_connect_security.js) and runs it in CI before the live proxy tests.