Code Read the original on Thecyberexpress 2 min read 0

Thousands of ChatGPT API keys exposed on GitHub and websites

A significant security lapse has been identified involving the widespread exposure of ChatGPT API keys across public platforms. Research indicates that thousands of these credentials are currently accessible on GitHub and live production websites, creating a major risk for unauthorized access to AI services. The findings highlight a critical gap in security discipline as organizations rush to integrate artificial intelligence into their software development lifecycles without proper credential management.

Рука тримає смартфон із відкритим інтерфейсом чат-бота ChatGPT на фоні розмитих кімнатних рослин.
Рука тримає смартфон із відкритим інтерфейсом чат-бота ChatGPT на фоні розмитих кімнатних рослин. · Image source: Thecyberexpress

According to Thecyberexpress, research conducted by Cyble Research and Intelligence Labs (CRIL) has uncovered a massive volume of exposed ChatGPT API keys. These credentials are being left accessible across public infrastructure, significantly lowering the barrier for malicious actors to exploit AI services and associated billing accounts.

Widespread exposure in development repositories

The study identified more than 5,000 publicly accessible GitHub repositories containing hardcoded OpenAI credentials. These leaks often occur during rapid development cycles where engineers may embed keys directly into source code, configuration files, or .env files for testing purposes. While developers might intend to remove these secrets later, they frequently persist in commit histories, forks, and archived projects.

CRIL's analysis shows that these exposures are not limited to a single language but span across various environments, including:

  • JavaScript applications and Python scripts
  • Continuous Integration and Continuous Deployment (CI/CD) pipelines
  • Infrastructure configuration files
  • Recently updated or actively maintained repositories

Once a secret is committed to a public repository, automated scanners can index it within minutes. This creates a very narrow window between the initial mistake and potential exploitation by bad actors.

Security risks in live production environments

Beyond development repositories, CRIL found approximately 3,000 live websites leaking active API keys directly in client-side JavaScript and other front-end assets. This means that anyone inspecting network traffic or viewing the application source code can easily harvest these tokens without needing to breach any internal infrastructure.

The research noted two primary types of prefixes commonly found in these leaks:

  • sk-proj-: Typically denotes a project-scoped key tied to specific billing configurations.
  • sk-svcacct-: Generally represents a service-account key intended for backend automation or system-level integration.

Despite their different scopes, both function as privileged authentication tokens. Richard Sands, CISO at Cyble, noted that "The AI Era Has Arrived — Security Discipline Has Not." He explained that while AI is now production-grade infrastructure, the security rigor applied to traditional cloud credentials has not consistently extended to these new keys. The rise of "vibe coding"—a culture prioritizing speed and rapid feature delivery over foundational security—has contributed to API keys being treated as simple configuration values rather than sensitive secrets.

The findings serve as a stark reminder that tokens are the modern equivalent of passwords and require rigorous management to prevent unauthorized usage and financial loss.

FAQ

Where are the exposed ChatGPT API keys located?
The credentials are accessible across public infrastructure, specifically within more than 5,000 GitHub repositories and approximately 3,000 live websites. They appear in source code, configuration files, .env files, and client-side JavaScript assets.
What types of prefixes are commonly found in these leaks?
The research identified two primary prefixes: sk-proj-, which typically denotes a project-scoped key tied to specific billing configurations, and sk-svcacct-, which generally represents a service-account key intended for backend automation or system-level integration.
Why are so many API keys being exposed publicly?
Leaks often occur during rapid development cycles where engineers embed keys directly into code for testing. The culture of prioritizing speed over foundational security, sometimes called vibe coding, leads to these tokens being treated as simple configuration values rather than sensitive secrets.
Telegram

Fresh news on our Telegram

Get instant alerts for new posts in «Code»

@procodeandevenmore