Title: [SDK-8000] Reject TLS chains carrying the compromised eMudhra intermediate keys by harshit-browserstack · Pull Request #1203 · browserstack/browserstack-cypress-cli · GitHub
Open Graph Title: [SDK-8000] Reject TLS chains carrying the compromised eMudhra intermediate keys by harshit-browserstack · Pull Request #1203 · browserstack/browserstack-cypress-cli
X Title: [SDK-8000] Reject TLS chains carrying the compromised eMudhra intermediate keys by harshit-browserstack · Pull Request #1203 · browserstack/browserstack-cypress-cli
Description: Summary Jira: SDK-8000. Same fix as SDK-7999 in browserstack-binary#1960 and browserstack-node-agent#2742. The private keys of 8 eMudhra intermediate CAs are recoverable (incident), and Node.js has not shipped the distrust yet (nodejs/node#66871 is unreleased). The CLI runs on the customer's Node and sends the username and access key to api, api-cloud, automate and eds.browserstack.com, so anyone on the network path can present a certificate the CLI accepts and read the key and the uploaded test suite. Change New bin/helpers/distrustedCaCheck.js wraps tls.checkServerIdentity: Node's hostname check runs first, then the connection is refused (ERR_TLS_DISTRUSTED_INTERMEDIATE) if any certificate in the chain has one of the 8 published SPKI SHA-256 hashes. Matching the key catches both the emSign-issued and the Sectigo cross-signed copies. Installed at the top of bin/helpers/utils.js instead of bin/runner.js: utils.js is loaded by every CLI command and by the code that runs inside the customer's Cypress process (Test Observability reporter and crash reporter, Accessibility plugin), which a hook in runner.js would not reach. Local: the CLI starts Local with browserstack-local's async start() (1.5.13), which does the endpoint lookup and the binary download in-process, so this hook covers them too. The SPKI is re-exported with crypto.createPublicKey from the certificate: cert.pubkey is the raw point for EC keys (hashing it never matches), and X509Certificate needs Node 15.6. Verification build-info with RAILS_HOST / USAGE_REPORTING_URL pointed at dv-g3b-emudhra and dv-g3b-aaa-emudhra.we-have-a-problem.com (fake credentials): master completes TLS and receives the host's response on Node 14 and 18 (both chains); this branch gets ERR_TLS_DISTRUSTED_INTERMEDIATE and receives nothing, on Node 14, 18 and 22. api.browserstack.com is still reached. Local start() with bs-host pointed at the incident host (fake key): master completes TLS and parses the host's reply; this branch refuses the connection. Unit tests: 723 passing, 2 pending, 16 failing; the same 16 fail on master. Not run yet: a full browserstack-cypress run on BrowserStack. Summary by CodeRabbit Security TLS validation now rejects certificate chains containing any of eight distrusted eMudhra intermediate certificate authorities. Connections with affected chains fail with an error identifying the hostname and certificate authority. Existing hostname validation behavior and error reporting remain unchanged. The check is applied automatically when the command-line utility loads; if it cannot be installed, the utility continues loading. Repeated installation attempts do not add duplicate validation checks.
Open Graph Description: Summary Jira: SDK-8000. Same fix as SDK-7999 in browserstack-binary#1960 and browserstack-node-agent#2742. The private keys of 8 eMudhra intermediate CAs are recoverable (incident), and Node.js has...
X Description: Summary Jira: SDK-8000. Same fix as SDK-7999 in browserstack-binary#1960 and browserstack-node-agent#2742. The private keys of 8 eMudhra intermediate CAs are recoverable (incident), and Node.js has...
Opengraph URL: https://github.com/browserstack/browserstack-cypress-cli/pull/1203
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:3a0cc7b4-1206-7dbc-1fdf-c48ccec886d5 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9F8A:B0AA1:1B3C40:25A485:6B04487F |
| html-safe-nonce | f1992cdc3a87b93c238b2f5bb0778611d3139e39872983fb2372080e038dc3cc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RjhBOkIwQUExOjFCM0M0MDoyNUE0ODU6NkIwNDQ4N0YiLCJ2aXNpdG9yX2lkIjoiNDU1MDM2MjU5NzQyOTYyNzAwNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 246893138457a20a43b7cdb03411025b3e8821c85e8b2dad0fa5ab7f78d24edc |
| hovercard-subject-tag | pull_request:4951161826 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/browserstack/browserstack-cypress-cli/pull/1203/files |
| twitter:image | https://avatars.githubusercontent.com/u/250154764?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/250154764?s=400&v=4 |
| og:image:alt | Summary Jira: SDK-8000. Same fix as SDK-7999 in browserstack-binary#1960 and browserstack-node-agent#2742. The private keys of 8 eMudhra intermediate CAs are recoverable (incident), and Node.js has... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | d4495c3631faba668036f176d1f5946901c5172efd73a6edb984029e7d4f8e46 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/browserstack/browserstack-cypress-cli git https://github.com/browserstack/browserstack-cypress-cli.git |
| octolytics-dimension-user_id | 1119453 |
| octolytics-dimension-user_login | browserstack |
| octolytics-dimension-repository_id | 242935045 |
| octolytics-dimension-repository_nwo | browserstack/browserstack-cypress-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 242935045 |
| octolytics-dimension-repository_network_root_nwo | browserstack/browserstack-cypress-cli |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9ac4337fb7c6a5846cdfdb1a04f154d3c33ebc77 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | no-cache |
Viewport: width=device-width