/

CVE-2026-105221

Severity:

HIGH RISK

(7.4)

Improper Certificate Validation (CWE-295) in gist RubyGem

CVE-2026-105221

Deferred

Vulnerability type

Category:

Improper Certificate Validation

CWE:

CWE-295

Impact:

Credential Exposure and HTTPS Traffic Manipulation

Severity:

HIGH RISK

(7.4)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

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.

Sources

SourceLink
github.comgithub.com/defunkt/gist
github.comgithub.com/defunkt/gist/blob/v6.0.0/lib/gist.rb#L466-L468
github.comgithub.com/defunkt/gist/commit/07ccc1a6d46e9d36f0e85d0b1c5d795890ae6bcf
github.comgithub.com/defunkt/gist/issues/373
vulncheck.comvulncheck.com/advisories/gist-rubygem-before-6.1.0-disabled-tls-certificate-verification

Frequently asked

questions

It can be exploitable remotely when an attacker can position themselves on the network path between the RubyGem and the GitHub API. It is not typically exploitable solely by sending an application request to the affected component.

The attacker generally needs on-path network access, such as control of a hostile network, proxy, gateway, or other traffic-interception point. They also need the victim application to make an HTTPS API request through the vulnerable connection.

The safest pattern is to use an HTTPS client that performs certificate-chain and hostname validation using a trusted certificate store, without allowing insecure verification settings.

Enforce secure transport policies in code review and CI, scan for disabled TLS verification, limit token permissions, and monitor for unexpected certificate or proxy behavior.

Find out what's already
exploitable in your codebase.