Use of Hard-coded Credentials (CWE-798)
CWE-798, Use of Hard-coded Credentials, is the MITRE CWE entry for weaknesses in which the product contains hard-coded credentials, such as a password or cryptographic key. The database tracks 10 CVE records mapped to CWE-798, and 10 of them are in the CISA Known Exploited Vulnerabilities catalog.
Updated
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- 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 patternsCAPEC-70Try Common or Default Usernames and PasswordsDetailed · Severity High · Likelihood Medium
Loading…
CAPEC-191Read Sensitive Constants Within an ExecutableDetailed · Severity Low
Loading…
CWE-798 Vulnerabilities
10 CVEs| CVE | Title | Vendor | CVSS | EPSS | KEV | Published |
|---|---|---|---|---|---|---|
| CVE-2026-76466KEV Cisco Expressway Series Remote Code Execution Vulnerability | Cisco Expressway Series Remote Code Execution Vulnerability | Cisco | 9.8 | 2.2% | KEV | 2026-10-21 |
| CVE-2026-22769KEV Dell RecoverPoint for Virtual Machines (RP4VMs) Use of Hard-coded Credentials Vulnerability | Dell RecoverPoint for Virtual Machines (RP4VMs) Use of Hard-coded Credentials Vulnerability | Dell | 10.0 | 13.3% | KEV | 2026-02-17 |
| CVE-2025-14611KEV Gladinet CentreStack and TrioFox Hard Coded AES Keys | Gladinet CentreStack and TrioFox Hard Coded AES Keys | Gladinet | 7.1 | 54.5% | KEV | 2025-12-12 |
| CVE-2019-6693KEV Fortinet FortiOS Use of Hard-Coded Credentials Vulnerability | Fortinet FortiOS Use of Hard-Coded Credentials Vulnerability | Fortinet | 6.5 | 6.6% | KEV | 2019-11-21 |
| CVE-2021-44207KEV Acclaim Systems USAHERDS Use of Hard-Coded Credentials Vulnerability | Acclaim Systems USAHERDS Use of Hard-Coded Credentials Vulnerability | - | 8.1 | 17.4% | KEV | 2021-12-21 |
| CVE-2024-28987KEV SolarWinds Web Help Desk Hardcoded Credential Vulnerability | SolarWinds Web Help Desk Hardcoded Credential Vulnerability | SolarWinds | 9.1 | 93.3% | KEV | 2024-08-21 |
| CVE-2024-3272KEV D-Link DNS-320L/DNS-325/DNS-327L/DNS-340L HTTP GET Request nas_sharing.cgi hard-coded credentials | D-Link DNS-320L/DNS-325/DNS-327L/DNS-340L HTTP GET Request nas_sharing.cgi hard-coded credentials | D-Link | 9.8 | 98.1% | KEV | 2024-04-04 |
| CVE-2022-28810KEV Zoho ManageEngine ADSelfService Plus Remote Code Execution Vulnerability | Zoho ManageEngine ADSelfService Plus Remote Code Execution Vulnerability | - | 6.8 | 71.0% | KEV | 2022-04-18 |
| CVE-2022-26138KEV Atlassian Questions For Confluence App Hard-coded Credentials Vulnerability | Atlassian Questions For Confluence App Hard-coded Credentials Vulnerability | Atlassian | 9.8 | 98.1% | KEV | 2022-07-20 |
| CVE-2020-8657KEV EyesOfNetwork Use of Hard-Coded Credentials Vulnerability | EyesOfNetwork Use of Hard-Coded Credentials Vulnerability | - | 9.8 | 91.9% | KEV | 2020-02-06 |
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.