Skip to content
OpenAdvisories

Weakness (CWE)

CWE-798: Use of Hard-coded Credentials

Base Draft

The product contains hard-coded credentials, such as a password or cryptographic key.

How to prevent it (5 mitigations)
  1. Architecture and Design

    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 [REF-7].

    In Windows environments, the Encrypted File System (EFS) may provide some protection.

  2. Architecture and Design

    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.

  3. Architecture and Design

    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.

  4. Architecture and Design

    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.

    Use randomly assigned salts for each separate hash that is generated. This increases the amount of computation that an attacker needs to conduct a brute-force attack, possibly limiting the effectiveness of the rainbow table method.

  5. Architecture and Design

    For front-end to back-end connections: Three solutions are possible, although none are complete.

    - The first suggestion involves the use of generated passwords or keys that are changed automatically and must be entered at given time intervals by a system administrator. These passwords will be held in memory and only be valid for the time intervals.

    - Next, the passwords or keys should be limited at the back end to only performing actions valid for the front end, as opposed to having full access.

    - Finally, the messages sent should be tagged and checksummed with time sensitive values so as to prevent replay-style attacks.

Source: MITRE CWE-798

9 results · Clear filters · Feed

  • Critical 10.0
    CVE-2026-22769 Exploited EPSS 14%

    Dell RecoverPoint for Virtual Machines, versions prior to 6.0.3.1 HF1, contain a hardcoded credential vulnerability. Th…

    KEV Feb 18, 2026
  • High 7.1
    CVE-2025-14611 Exploited Public exploit EPSS 53%

    Gladinet CentreStack and TrioFox Hard Coded AES Keys

    Gladinet CentreStack and Triofox prior to version 16.12.10420.56791 used hardcoded values for their implementation of the AES cryptoscheme. This degrades security for public exposed endpoints that may make use of it and may offer arbitrary local file inclusio…

    KEV Dec 15, 2025
  • Critical 9.1
    CVE-2024-28987 Exploited Public exploit EPSS 93%

    SolarWinds Web Help Desk Hardcoded Credential Vulnerability

    The SolarWinds Web Help Desk (WHD) software is affected by a hardcoded credential vulnerability, allowing remote unauthenticated user to access internal functionality and modify data.

    KEV Oct 15, 2024
  • Critical 9.8
    CVE-2024-3272 Exploited Public exploit EPSS 98%

    D-Link DNS-320L/DNS-325/DNS-327L/DNS-340L HTTP GET Request nas_sharing.cgi hard-coded credentials

    ** UNSUPPORTED WHEN ASSIGNED ** A vulnerability, which was classified as very critical, has been found in D-Link DNS-320L, DNS-325, DNS-327L and DNS-340L up to 20240403. This issue affects some unknown processing of the file /cgi-bin/nas_sharing.cgi of the co…

    KEV Apr 11, 2024
  • Critical 9.8
    CVE-2022-26138 Exploited Public exploit EPSS 98%

    The Atlassian Questions For Confluence app for Confluence Server and Data Center creates a Confluence user account in t…

    KEV Jul 29, 2022
  • Medium 6.8
    CVE-2022-28810 Exploited Public exploit EPSS 71%

    Zoho ManageEngine ADSelfService Plus before build 6122 allows a remote authenticated administrator to execute arbitrary…

    KEV Mar 7, 2023
  • High 8.1
    CVE-2021-44207 Exploited EPSS 17%

    Acclaim USAHERDS through 7.4.0.1 uses hard-coded credentials.

    KEV Dec 23, 2024
  • Critical 9.8
    CVE-2020-8657 Exploited Public exploit EPSS 92%

    An issue was discovered in EyesOfNetwork 5.3. The installation uses the same API key (hardcoded as EONAPI_KEY in includ…

    KEV Nov 3, 2021
  • Medium 6.5
    CVE-2019-6693 Exploited · Ransomware Public exploit

    Use of a hard-coded cryptographic key to cipher sensitive data in FortiOS configuration backup file may allow an attack…

    KEV Jun 25, 2025