Skip to main content

About CWE-798

MITRE lists these common consequences: Bypass Protection Mechanism, Read Application Data, Gain Privileges or Assume Identity, Execute Unauthorized Code or Commands, affecting access control, integrity, confidentiality, availability.

MITRE name
Use of Hard-coded Credentials
Abstraction
Base: abstract, but detailed enough to infer detection and prevention methods
Status
Draft

Mitigations

  • For outbound authentication: store passwords, keys, and other credentials outside of the code in a strongly-protected, encrypted configuration file or database that is protected from access by all outsiders, including other local users on the same system. Properly protect the key (CWE-320). If you cannot use encryption to protect the file, then make sure that the permissions are as restrictive as possible.
  • For inbound authentication: Rather than hard-code a default username and password, key, or other authentication credentials for first time logins, utilize a "first login" mode that requires the user to enter a unique strong password or key.
  • If the product must contain hard-coded credentials or they cannot be removed, perform access control checks and limit which entities can access the feature that requires the hard-coded credentials. For example, a feature might only be enabled through the system console instead of through a network connection.
  • For inbound authentication using passwords: apply strong one-way hashes to passwords and store those hashes in a configuration file or database with appropriate access control. That way, theft of the file/database still requires the attacker to try to crack the password. When handling an incoming password during authentication, take the hash of the password and compare it to the saved hash.

Detection
MITRE lists these detection methods: Manual Static Analysis - Binary or Bytecode (high), Manual Static Analysis - Source Code (high), Automated Static Analysis - Source Code (high), Architecture or Design Review (high), Black Box (moderate).

CWE-798 in the KEV Catalog

as of 2026-11-22
All KEV statistics→
  • 10 CISA KEV entries name Use of Hard-coded Credentials (CWE-798) in their CVE record, tied for 32nd among the 196 weaknesses named in the catalog.
  • CISA added 3 CWE-798 entries to the KEV catalog in 2024, 2 in 2025, and 2 so far in 2026.
  • CISA marks 10% of CWE-798 KEV entries (1 of 10) as known to be used in ransomware campaigns, compared with 20% of all KEV entries.
  • CISA's SSVC enrichment rates 60% of CWE-798 KEV entries with SSVC data (6 of 10) as automatable, compared with 41% across the catalog.

Related Attack Patterns

2 CAPEC patterns
CAPEC-70Try Common or Default Usernames and PasswordsDetailed · Severity High · Likelihood Medium
CAPEC-191Read Sensitive Constants Within an ExecutableDetailed · Severity Low

CWE-798 Vulnerabilities

10 CVEs
CVECVSS
CVE-2026-76466KEV
Cisco Expressway Series Remote Code Execution Vulnerability
9.8
CVE-2026-22769KEV
Dell RecoverPoint for Virtual Machines (RP4VMs) Use of Hard-coded Credentials Vulnerability
10.0
CVE-2025-14611KEV
Gladinet CentreStack and TrioFox Hard Coded AES Keys
7.1
CVE-2019-6693KEV
Fortinet FortiOS Use of Hard-Coded Credentials Vulnerability
6.5
CVE-2021-44207KEV
Acclaim Systems USAHERDS Use of Hard-Coded Credentials Vulnerability
8.1
CVE-2024-28987KEV
SolarWinds Web Help Desk Hardcoded Credential Vulnerability
9.1
CVE-2024-3272KEV
D-Link DNS-320L/DNS-325/DNS-327L/DNS-340L HTTP GET Request nas_sharing.cgi hard-coded credentials
9.8
CVE-2022-28810KEV
Zoho ManageEngine ADSelfService Plus Remote Code Execution Vulnerability
6.8
CVE-2022-26138KEV
Atlassian Questions For Confluence App Hard-coded Credentials Vulnerability
9.8
CVE-2020-8657KEV
EyesOfNetwork Use of Hard-Coded Credentials Vulnerability
9.8

Frequently Asked Questions

What is CWE-798?→

CWE-798 (Use of Hard-coded Credentials) is a MITRE CWE entry. The product contains hard-coded credentials, such as a password or cryptographic key.

How many exploited vulnerabilities are classified as CWE-798?→

This database lists 10 CVE records mapped to CWE-798 by their CVE Numbering Authority. 10 of them are in the CISA Known Exploited Vulnerabilities catalog, and CISA links 1 to known ransomware campaigns. Examples include CVE-2026-76466, CVE-2026-22769, CVE-2025-14611.

Weakness description, consequences, and mitigations from the CWE List, © The MITRE Corporation, used under the CWE Terms of Use. CWE mappings come from each CVE record's CNA. Exploited-in-the-wild data from the CISA KEV catalog (CC0). This site is not affiliated with or endorsed by MITRE or CISA. Attack patterns from CAPEC 3.9, © The MITRE Corporation, used under the CAPEC Terms of Use.