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

53 results · Clear filters · Feed

  • High 8.8
    CVE-2021-43116 Public exploit

    Use of Hard-coded Credentials in Nacos

    An Access Control vulnerability exists in Nacos 2.0.3 in the access prompt page; enter username and password, click on login to capture packets and then change the returned package, which lets a malicious user login.

  • High 8.8
    CVE-2022-29778 Public exploit

    D-Link DIR-890L 1.20b01 allows attackers to execute arbitrary code due to the hardcoded option Wake-On-Lan for the para…

  • 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 7.3
    CVE-2022-26671 Public exploit

    TAIWAN SECOM CO., LTD., a xDoor Access Control and Personnel Attendance Management system - Hard-coded Credentials

    Taiwan Secom Dr.ID Access Control system’s login page has a hard-coded credential in the source code. An unauthenticated remote attacker can use the hard-coded credential to acquire partial system information and modify system setting to cause partial disrupt…

  • High 7.2
    CVE-2020-5248 Public exploit

    Public GLPIKEY can be used to decrypt any data in GLPI

    GLPI before before version 9.4.6 has a vulnerability involving a default encryption key. GLPIKEY is public and is used on every instance. This means anyone can decrypt sensitive data stored using this key. It is possible to change the key before installing GL…

  • High 8.6
    CVE-2020-1764 Public exploit

    Hard coded cryptographic key in Kiali

    A hard-coded cryptographic key vulnerability in the default configuration file was found in Kiali, all versions prior to 1.15.1. A remote attacker could abuse this flaw by creating their own JWT signed tokens and bypass Kiali authentication mechanisms, possib…

  • 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
  • Critical 9.8
    CVE-2019-15977 Public exploit EPSS 38%

    Cisco Data Center Network Manager Authentication Bypass Vulnerabilities

    Multiple vulnerabilities in the authentication mechanisms of Cisco Data Center Network Manager (DCNM) could allow an unauthenticated, remote attacker to bypass authentication and execute arbitrary actions with administrative privileges on an affected device. …

  • Critical 9.8
    CVE-2019-15975 Public exploit EPSS 96%

    Cisco Data Center Network Manager Authentication Bypass Vulnerabilities

    Multiple vulnerabilities in the authentication mechanisms of Cisco Data Center Network Manager (DCNM) could allow an unauthenticated, remote attacker to bypass authentication and execute arbitrary actions with administrative privileges on an affected device. …

  • Critical 9.8
    CVE-2019-15976 Public exploit EPSS 93%

    Cisco Data Center Network Manager Authentication Bypass Vulnerabilities

    Multiple vulnerabilities in the authentication mechanisms of Cisco Data Center Network Manager (DCNM) could allow an unauthenticated, remote attacker to bypass authentication and execute arbitrary actions with administrative privileges on an affected device. …

  • 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
  • Critical 9.8
    CVE-2019-1935 Public exploit EPSS 83%

    Cisco Integrated Management Controller Supervisor, Cisco UCS Director, and Cisco UCS Director Express for Big Data SCP User Default Credentials Vulnerability

    A vulnerability in Cisco Integrated Management Controller (IMC) Supervisor, Cisco UCS Director, and Cisco UCS Director Express for Big Data could allow an unauthenticated, remote attacker to log in to the CLI of an affected system by using the SCP User accoun…

  • Critical 9.8
    CVE-2018-15439 Public exploit EPSS 50%

    Cisco Small Business Switches Privileged Access Vulnerability

    A vulnerability in the Cisco Small Business Switches software could allow an unauthenticated, remote attacker to bypass the user authentication mechanism of an affected device. The vulnerability exists because under specific circumstances, the affected softwa…