security: CWE-295: TLS verification disabled — VC-53768#190
Open
torresashjiancyber wants to merge 1 commit into
Open
security: CWE-295: TLS verification disabled — VC-53768#190torresashjiancyber wants to merge 1 commit into
torresashjiancyber wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes CWE-295 (Improper Certificate Validation) by enabling TLS certificate verification by default in all shipped examples and adding runtime warnings when verification is explicitly disabled.
Finding
Severity: High (CVSS 6.0)
CWE: CWE-295 (Improper Certificate Validation) / CWE-1188 (Insecure Default)
Four shipped examples (
examples/get_cert.py,examples/tpp/get_cert_tpp_token.py,examples/ssh_certificates/get_cert_ssh.py,examples/ssh_certificates/get_cert_ssh_service.py) sethttp_request_kwargs={'verify': False}as the active code path, instructing consumers to disable TLS certificate validation. The secure trust-bundle alternative was present only as a commented-out suggestion.The SDK connection classes (
TPPConnection,TPPTokenConnection,CloudConnection) forwardhttp_request_kwargsverbatim to allrequestscalls without inspecting, warning, or rejectingverify=False. This includes calls that transmit Venafi credentials, session tokens, key passphrases, and private keys.With verification disabled, an on-path attacker can present any certificate, capture transmitted secrets (username/password, bearer tokens, key passphrases), and substitute server-supplied cryptographic material.
Remediation
Examples (4 files):
verify=Falsetoverify="/path-to/bundle.pem"(trust bundle)verify=Falseto a comment explicitly labeled "Lab/testing only — DO NOT use in production"SDK connection classes (3 files):
TPPTokenConnection.__init__,TPPConnection.__init__, andCloudConnection.__init__http_request_kwargs.get('verify') is Falseis Falseto distinguish explicit boolean from CA-bundle path string or omitted keyVerification
python3 -m py_compile)verifykey) paths unchangedverify=False; does not prevent (consumers can still override), but alerts operatorsAddresses Jira ticket VC-53768.