Skip to content

Security: TLS Certificate Validation Disabled#1702

Open
tomaioo wants to merge 1 commit intoREditorSupport:masterfrom
tomaioo:fix/security/tls-certificate-validation-disabled
Open

Security: TLS Certificate Validation Disabled#1702
tomaioo wants to merge 1 commit intoREditorSupport:masterfrom
tomaioo:fix/security/tls-certificate-validation-disabled

Conversation

@tomaioo
Copy link
Copy Markdown

@tomaioo tomaioo commented May 9, 2026

Summary

Security: TLS Certificate Validation Disabled

Problem

Severity: Critical | File: src/helpViewer/cran.ts:L17

In src/helpViewer/cran.ts line 17, the code sets process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0' to bypass TLS certificate verification. This creates a serious security vulnerability allowing man-in-the-middle attacks when fetching packages from CRAN mirrors.

Solution

Remove the TLS bypass. If there are specific CRAN mirrors with certificate issues, use a custom CA certificate instead of disabling validation globally. The finally block attempts to reset it but this pattern is unsafe.

Changes

  • src/helpViewer/cran.ts (modified)

In src/helpViewer/cran.ts line 17, the code sets `process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'` to bypass TLS certificate verification. This creates a serious security vulnerability allowing man-in-the-middle attacks when fetching packages from CRAN mirrors.

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
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.

1 participant