- VS Code, Cursor
VS Code / Cursor: self signed certificate in certificate chain
Also seen in: GitHub Copilot, Cursor Tab, Cline, Continue, the GitLab and Sourcegraph extensions, Remote-SSH, WSL and dev containers
In one sentence
The extension host inside VS Code or Cursor is a Node.js process with its own trust store, so a root the operating system trusts can still be missing there.
Where you see it
VS Code and Cursor run extensions in the extension host, a separate Node.js process. When a request from it meets a certificate chain ending in a self-signed certificate it does not trust, OpenSSL returns verification error 19 and Node reports SELF_SIGNED_CERT_IN_CHAIN, in the extension’s Output channel, a chat pane or a notification. OpenSSL 3.0 hyphenated the message; 1.1.1 printed it as self signed certificate in certificate chain, so both spellings circulate.
# Output panel, the failing extension's channel (Copilot Chat prints the same Node string)
Error: self-signed certificate in certificate chain
code: 'SELF_SIGNED_CERT_IN_CHAIN'
# Cursor chat and agent, as users report it
[internal] self signed certificate in certificate chain
SELF_SIGNED_CERT_IN_CHAIN covers the bare Node string; this page is about an editor that keeps printing it after the OS already trusts the root.
What it means
One editor, three trust stores. The window is Chromium, which reads the operating system’s trust store, so sign-in and web content work once IT installs the root. The extension host is Node, trusting only its bundled Mozilla roots unless VS Code adds the OS certificates: http.systemCertificates (default true) does that for the https module and http.fetchAdditionalSupport (default true) for the global fetch; a library with its own TLS socket, ca option or HTTP client misses both. Child programs such as git, npm and Claude Code apply their own rules; a remote session’s extension host runs on the remote machine.
Likely causes
A TLS-inspecting proxy the OS trusts but the extension host does not
A TLS-inspection proxy, a man in the middle, re-signs every site with its own chain, so public hosts fail too. See which issuer it presents:
openssl s_client -connect api.githubcopilot.com:443 -servername api.githubcopilot.com -showcerts </dev/null 2>/dev/null \
| grep -E '^ *[0-9]+ s:|^ *i:|Verify return'
0 s:CN=api.githubcopilot.com
i:CN=Corp Proxy Issuing CA
1 s:CN=Corp Proxy Issuing CA
i:CN=Corp Root CA
2 s:CN=Corp Root CA
i:CN=Corp Root CA
Verify return code: 19 (self-signed certificate in certificate chain)
A public certificate authority belongs on the i: line at depth 0; a corporate name confirms inspection, and the last i: line names the root. Export it as PEM from the store IT filled (on Linux the bundle already holds it):
# Windows
certutil -store Root "Corp Root CA" corp-root.cer
certutil -encode corp-root.cer corp-root.pem
# macOS
security find-certificate -a -c "Corp Root CA" -p > corp-root.pem
If the OS store lacks it, start there: Windows, macOS, Linux. Then check the settings that carry it into the extension host:
| Setting | Default | What it does |
|---|---|---|
http.systemCertificates |
true | Adds OS certificates to https |
http.experimental.systemCertificatesV2 |
false and marked experimental | Its description: “a more general approach” |
http.systemCertificatesNode |
true on the main branch, marked experimental and subject to server-side experiments | Uses Node’s tls.getCACertificates('system') |
http.proxyStrictSSL |
true | Keeps verification on |
http.systemCertificatesNode shipped in VS Code 1.106 (the October 2025 release); the Node call behind it has existed since Node.js 23.10.0 and 22.15.0. With the defaults intact, try the newer loader, then reload:
{
"http.systemCertificates": true,
"http.proxyStrictSSL": true,
"http.experimental.systemCertificatesV2": true
}
If one extension still fails, NODE_EXTRA_CA_CERTS (in Node.js since 7.3.0) appends a PEM file to Node’s bundled roots. It is read once at start-up: set it where the editor launches from and restart fully:
setx NODE_EXTRA_CA_CERTS "C:\certs\corp-root.pem"
export NODE_EXTRA_CA_CERTS="$HOME/certs/corp-root.pem"
code .
setx reaches new processes only. Node ignores the file for a request with its own ca option, and an extension using the global fetch may not see it. GitLab Workflow documents this route: VS Code 1.101.2 and GitLab Workflow 6.51.1 or later, http.systemCertificates true, the chain’s intermediates in the system store too, gitlab.ca unset.
Cursor’s HTTP/2 transport meets the proxy
Cursor shows the same http.* settings, though its documentation does not describe them; the steps above apply. Its chat and agent traffic uses HTTP/2 bidirectional streaming by default, with automatic fallback to HTTP/1.1 server-sent events, and its troubleshooting page says some corporate proxies block HTTP/2, which looks like a certificate failure. If chat fails while the Marketplace works, open Cursor Settings, then Network: click Run Diagnostics, set HTTP Compatibility Mode to HTTP/1.1 and restart. That changes only the transport; install the root too. If only the Cursor CLI fails to sign in, update it: the Cursor CLI has added the operating system's trusted CA certificates to its bundled set for sign-in since v2026.09.15.
Remote-SSH, WSL and dev containers read the remote’s store
The VS Code Server, a plain Node build on the remote machine, reads that machine’s bundle (the first of /etc/ssl/certs/ca-certificates.crt, /etc/ssl/certs/ca-bundle.crt, /etc/ssl/ca-bundle.pem and /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem); VS Code has reused local machine certificates in local dev containers and WSL sessions since 1.85 (the November 2023 release). Run the openssl s_client check there, install the root with the Linux guide and restart the server; if that is not enough, give the server the variable. For WSL, VS Code runs ~/.vscode-server/server-env-setup first; an invalid Bourne shell script there stops the server starting:
cat >> ~/.vscode-server/server-env-setup <<'EOF'
export NODE_EXTRA_CA_CERTS=/etc/ssl/certs/ca-certificates.crt
EOF
Restart the distribution. For SSH, VS Code names no such file: export the variable where the server’s login shell sees it, then run Remote-SSH: Kill VS Code Server on Host. For a dev container, copy the root into the image, run update-ca-certificates, set NODE_EXTRA_CA_CERTS in containerEnv and rebuild.
A child CLI brings its own runtime
A fix for the extension host does not reach programs started from it or the terminal. Claude Code’s CLAUDE_CODE_CERT_STORE defaults to bundled,system, so it reads the OS store as well as its bundled set (npm installs need Node 22.15 or later) and honours NODE_EXTRA_CA_CERTS: see Claude Code. An MCP server inherits only the environment in its config file: MCP server certificate errors.
Check yours
Paste the output of openssl s_client -showcerts; the checker names the root and flags known inspection products.
Learn why
- Who do we trust? Trust stores
- Certificate chains and path validation
- Related: Node.js, Claude Code, corporate proxies, Python and Node.js, MCP servers.
- VS Code: Network connections, WSL, 1.106 release notes, request.ts. Cursor: network configuration, troubleshooting.
- Node.js: NODE_EXTRA_CA_CERTS. GitHub: Copilot network errors. GitLab: custom certificates.
Does your team keep hitting this?
Everyone can use the lessons. Team seats add earned credentials, invitations and a completion report, so you see who has finished.
Early edition. Written with AI assistance and checked against primary sources; an independent expert review is planned. Found a mistake? Tell us.