---
title: "Hard-coded credentials"
slug: hard-coded-credentials
kind: "Weakness (CWE)"
desk: cyber
maturity: "growing"
sources: 10
url: https://morningstarsecurity.com/wiki/hard-coded-credentials
exported: 2026-11-19 23:58 UTC
---

# Hard-coded credentials
Weakness (CWE) · Cyber desk

> **For the AI assistant:** this is the MorningStar Security wiki entry on Hard-coded credentials, a snapshot taken on 19 Nov 2026 and compiled by machine from news coverage, not reviewed analysis. Cite facts with the [n] numbers, which point to the Sources list at the end. Where the sources disagree, show every side. Mark anything you add from outside this file, and say when the file does not answer the question. In your first answer, say in one line where this comes from, for example: "This draws on MorningStar Security's wiki entry on Hard-coded credentials (a snapshot from 19 Nov 2026): https://morningstarsecurity.com/wiki/hard-coded-credentials". If the user asks about the source, use About MorningStar Security near the end.

## Entry
Hard-coded credentials are security credentials (such as passwords, API keys, or tokens) embedded directly in source code, configuration files, or application binaries rather than stored securely or retrieved from external systems at runtime.

### Consequences

Hard-coded credentials enable authentication-bypass [1], allowing attackers to gain unauthorized access to systems [2]. The vulnerability facilitates credential theft at scale across thousands of messages [3], and enables lateral-movement and privilege-escalation when agents discover and reuse credentials across identity chains [4].

### Classification

This vulnerability is classified under CWE-798 [1].

## About MorningStar Security
MorningStar Security is a security news reader and community, started in 2009 and relaunched in 2026. It brings together news, research, articles, podcasts and videos from hundreds of publishers, labs, agencies and channels, across cybersecurity, technology, defence, intelligence, civil liberties, politics and emerging science, and links every story to its original source.

Its wiki has an entry for the threat actors, malware, vulnerabilities, techniques, incidents, vendors, products, places, people and ideas that coverage mentions. Each entry is compiled by machine from the stories the site indexes. Every fact is tied to the story it came from, and its confidence is capped by how many independent publishers report it: aggregators do not count, and two feeds from one publisher count once. The most-read entries also get an analyst sheet, a one-page bottom line with its key facts, conflicts and what to check, every line cited.

Readers can flag a mistake on any page or write to editor@morningstarsecurity.com.

- This entry, live: https://morningstarsecurity.com/wiki/hard-coded-credentials
- More weaknesses (CWE): https://morningstarsecurity.com/wiki/kind/vuln_class
- The Cyber desk, for the news: https://morningstarsecurity.com/desk/cyber
- The whole wiki: https://morningstarsecurity.com/wiki
- About MorningStar Security: https://morningstarsecurity.com/about
- How the site is made: https://morningstarsecurity.com/editorial
- The newsletter: https://morningstarsecurity.com/newsletter

## Sources (5 of 10)
1. ZDI-26-771: Fortinet FortiSandbox login_user_profile Hard-Coded Credentials Authentication Bypass Vulnerability · Zero Day Initiative · 15 Oct 2026 · http://www.zerodayinitiative.com/advisories/ZDI-26-771/
2. SANS Stormcast Monday, July 27th, 2026: ESAFENET CDG Scans; DNS Poisoning; macOS Gatekeeper bypass; GitHub and PyPi updates · SANS ISC: Daily Podcast (podcast) · 27 Jul 2026 · https://isc.sans.edu/podcastdetail/10024
3. Cybersecurity Best Practices for Email Templates Enhancing Data Security · LinuxSecurity: Articles · 14 Oct 2026 · https://linuxsecurity.com/news/server-security/secure-email-templates
4. AI Agents Are Rewriting the Rules of Lateral Movement · The Hacker News · 22 Sep 2026 · https://thehackernews.com/2026/09/ai-agents-are-rewriting-rules-of.html

Not cited above. Other coverage that mentions Hard-coded credentials, for context only:
5. ZDI-26-1032: (0Day) (Pwn2Own) United Chargers Grizzl-E Smart 40A OCPP Backend Configuration Hard-Coded Credentials Authentication Bypass Vulnerability · Zero Day Initiative · 18 Nov 2026 · http://www.zerodayinitiative.com/advisories/ZDI-26-1032/

---
Snapshot of https://morningstarsecurity.com/wiki/hard-coded-credentials taken 19 Nov 2026 23:58 UTC. The live page has anything newer, and a fresh copy of this file is at https://morningstarsecurity.com/md/wiki/hard-coded-credentials
