Summary
The gist RubyGem before 6.1.0 disables HTTPS certificate verification for GitHub API connections, allowing an on-path attacker to impersonate the remote service.
If traffic is intercepted, the attacker may read or alter API requests and responses, potentially exposing OAuth tokens, login credentials, and gist contents.
Affected context
The vulnerability occurs in the RubyGem's HTTP connection handling when it communicates with the GitHub API over HTTPS. Deployments are at risk when a user or application relies on these connections across a network where an attacker can intercept traffic, such as an untrusted wireless network, compromised proxy, or hostile intermediary.
Exploit preconditions
- Attack surface: Outbound HTTPS connections from the gist RubyGem to the GitHub API
- Required access: Network positioning sufficient to intercept or alter traffic
- Trigger point: API requests made through the vulnerable HTTP connection
- Why exploitation is possible: Certificate verification is disabled, allowing an attacker-controlled certificate to be accepted as authentic
Why this happens
The underlying issue is an HTTPS client configuration that sets certificate verification to VERIFY_NONE. This removes the normal trust validation that binds the remote endpoint to a trusted certificate authority.
The behavior maps to CWE-295: Improper Certificate Validation, because the client accepts certificates without adequately verifying the identity of the server. As a result, TLS encryption may remain present while endpoint authentication is effectively defeated.
Potential impact
- An on-path attacker may read GitHub API traffic
- OAuth tokens or login credentials could be exposed
- Requests and responses could be modified in transit
- An attacker could read, alter, or delete the victim's gists
- Compromised credentials may enable broader unauthorized GitHub activity
General mitigation guidance
Mitigation generally focuses on preserving endpoint authentication throughout the TLS connection.
Common defensive patterns include:
- Enabling certificate and hostname verification by default
- Using the platform or language runtime's trusted certificate store
- Avoiding global settings that disable TLS verification
- Restricting proxy and network trust boundaries
- Applying least privilege to tokens used for API access
- Rotating credentials that may have traversed an untrusted connection
- Treating certificate-validation bypasses as security-policy violations
How teams detect issues like this
Organizations can identify this class of issue through:
- Static analysis searches for
VERIFY_NONE, disabled TLS verification, and insecure SSL context settings - Code review checks for custom HTTP clients and certificate-store overrides
- Dependency and source scanning for insecure transport configuration
- Runtime monitoring for unexpected proxying, certificate changes, or TLS verification failures being suppressed
- CI policies that reject code disabling certificate or hostname validation
Automated code-review and security-scanning tools may help detect these patterns, but network and credential monitoring provide useful complementary coverage.

