Skip to content

Fix HTTPS proxy TLS and CONNECT target CRLF injection - #54

Merged
proxymesh merged 1 commit into
mainfrom
fix/https-proxy-tls-and-connect-crlf
Sep 1, 2026
Merged

Fix HTTPS proxy TLS and CONNECT target CRLF injection#54
proxymesh merged 1 commit into
mainfrom
fix/https-proxy-tls-and-connect-crlf

Conversation

@cursor

@cursor cursor Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Fixes the two CONNECT issues from the at-rest scan:

  1. HTTPS proxieshttps:// proxy URLs now use tls.connect and wait for secureConnect before writing CONNECT, so Proxy-Authorization is not sent in the clear. HTTP proxies are unchanged. Adapters accept proxyTlsOptions for private CAs.
  2. CONNECT target CRLFbuildConnectRequest rejects CR/LF/NUL in targetHost and requires a numeric port in 1–65535, matching the existing proxyHeaders validation.

Adds npm run test:unit (test/test_connect_security.js) and runs it in CI before the live proxy tests.

Open in Web View Automation 

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
proxymesh marked this pull request as ready for review September 1, 2026 17:20
@cursor
cursor Bot requested review from proxymesh and proxymeshai September 1, 2026 17:21

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Open in Web View Automation 

Sent by Cursor Approval Agent: dependabot approver

@proxymesh
proxymesh merged commit c6442b6 into main Sep 1, 2026
2 checks passed
@proxymesh
proxymesh deleted the fix/https-proxy-tls-and-connect-crlf branch September 1, 2026 17:22
@cursor cursor Bot mentioned this pull request Sep 1, 2026
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