Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use an EventEmitter to replay failed proxy connect HTTP requests #77

Merged
merged 2 commits into from Oct 7, 2019

Conversation

TooTallNate
Copy link
Owner

@TooTallNate TooTallNate commented Oct 4, 2019

This is a fix for https://hackerone.com/reports/541502.

Aborts the upstream proxy connection and instead uses a vanilla EventEmitter instance to replay the "data" events on to. This way, the node core http Client doesn't attempt to write the HTTP request that is intended to go to the destination server to the proxy server.

Closes #76.
Fixes #78.

This is a fix for https://hackerone.com/reports/541502.

Aborts the upstream proxy connection and instead uses a vanilla
`EventEmitter` instance to replay the "data" events on to. This way,
the node core `http` Client doesn't attempt to write the HTTP request
that is intended to go to the destination server to the proxy server.

Closes #76.
@TooTallNate TooTallNate force-pushed the fix/hackerone.com/reports/541502 branch from 8df8813 to d9eb617 Compare October 4, 2019 20:22
@kadler15
Copy link

kadler15 commented Oct 7, 2019

Tested. Looks good!

image

@TooTallNate TooTallNate merged commit 36d8cf5 into master Oct 7, 2019
@TooTallNate TooTallNate deleted the fix/hackerone.com/reports/541502 branch October 7, 2019 19:53
@TooTallNate
Copy link
Owner Author

Thanks for the review. Published as v3.0.0.

TooTallNate pushed a commit to TooTallNate/node-pac-proxy-agent that referenced this pull request Oct 15, 2019
Fixes a MitM vulnerability in the module.

See: TooTallNate/proxy-agents#77
TooTallNate pushed a commit to TooTallNate/node-proxy-agent that referenced this pull request Oct 15, 2019
Fixes a MitM vulnerability in the module.

See: TooTallNate/proxy-agents#77
feelepxyz added a commit to feelepxyz/security-wg that referenced this pull request Nov 18, 2019
MarcinHoppe pushed a commit to nodejs/security-wg that referenced this pull request Nov 18, 2019
This was referenced Mar 12, 2021
patrickm68 added a commit to patrickm68/security-wg-process that referenced this pull request Sep 14, 2023
mattstern31 added a commit to mattstern31/security-wg-process that referenced this pull request Nov 11, 2023
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.

Man In the Middle vulnerability
3 participants