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

346 results · Clear filters · Feed

  • High 7.6

    ECOVACS lawnmowers and vacuums deterministic root password

    ECOVACS robot lawnmowers and vacuums use a deterministic root password generated based on model and serial number. An attacker with shell access can login as root.

  • High 8.4

    Hardcoded credentials

    The application uses several hard-coded credentials to encrypt config files during backup, to decrypt the new firmware during an update and some passwords allow a direct connection to the database server of the affected device.

  • High 7.5

    Ubiquiti U7-Pro 7.0.35 was discovered to contain a hardcoded password vulnerability in /etc/shadow, which allows attack…

  • High 7.5

    IBM Cognos Controller hard coded credentials

    IBM Cognos Controller 11.0.0 and 11.0.1 contains hard-coded credentials, such as a password or cryptographic key, which it uses for its own inbound authentication, outbound communication to external components, or encryption of internal data.

  • High 8.8

    Ever Traduora 0.20.0 and below is vulnerable to Privilege Escalation due to the use of a hard-coded JWT signing key.

  • High 7.3

    E-Lins H685/H685f/H700/H720/H750/H820/H820Q/H820Q0/H900 OEM Backend hard-coded credentials

    A vulnerability has been found in E-Lins H685, H685f, H700, H720, H750, H820, H820Q, H820Q0 and H900 up to 3.2 and classified as critical. This vulnerability affects unknown code of the component OEM Backend. The manipulation leads to hard-coded credentials. …

  • High 8.0

    Tenda W30E v2.0 V16.01.0.8 was discovered to contain a hardcoded password vulnerability in /etc_ro/shadow, which allows…

  • High 8.0

    Tenda W9 v1.0.0.7(4456) was discovered to contain a hardcoded password vulnerability in /etc_ro/shadow, which allows at…

  • High 8.8

    Azure Stack HCI Elevation of Privilege Vulnerability

    Azure Stack HCI Elevation of Privilege Vulnerability

  • High 7.1

    Hard-coded credentials used for temporary and cache data encryption

    In Progress® Telerik® Report Server versions prior to 2024 Q4 (10.3.24.1112), the encryption of local asset data used an older algorithm which may allow a sophisticated actor to decrypt this information.

  • High 7.8

    Hardcoded Service Password

    An attacker with local access to the medical office computer can access restricted functions of the Elefant Service tool by using a hard-coded "Hotline" password in the Elefant service binary, which is shipped with the software.

  • High 8.1

    LB-LINK BL-WR 1300H v.1.0.4 contains hardcoded credentials stored in /etc/shadow which are easily guessable.

  • High 8.1

    A security flaw involving hard-coded credentials in LevelOne WBR-6012's web services allows attackers to gain unauthori…

  • High 8.1

    A security flaw involving hard-coded credentials in LevelOne WBR-6012's web services allows attackers to gain unauthori…

  • High 8.0

    Tenda G3 v15.01.0.5(2848_755)_EN was discovered to contain a hardcoded password vulnerability in /etc_ro/shadow, which …

  • High 7.0

    Firmware extraction and Hardware SSL Pinning Bypass

    SSL Pinning Bypass in eWeLink Some hardware products allows local ATTACKER to Decrypt TLS communication and Extract secrets to clone the device via Flash the modified firmware

  • High 8.6

    PLANET Technology switch devices - Hard-coded SNMPv1 read-write community string

    Certain switch models from PLANET Technology have a Hard-coded community string in the SNMPv1 service, allowing unauthorized remote attackers to use this community string to access the SNMPv1 service with read-write privileges.

  • High 8.8

    PLANET Technology switch devices - Remote privilege escalation using hard-coded credentials

    Certain switch models from PLANET Technology have a hard-coded credential in the specific command-line interface, allowing remote attackers with regular privilege to log in with this credential and obtain a Linux root shell.

  • High 8.8

    An issue was discovered in Infinera hiT 7300 5.60.50. A hidden SSH service (on the local management network interface) …

  • High 8.8

    An issue was discovered in Infinera hiT 7300 5.60.50. Cleartext storage of sensitive password in firmware update packag…

  • High 8.8

    Victure PC420 1.1.39 was discovered to use a weak encryption key for the file enabled_telnet.dat on the Micro SD card.

  • High 8.8

    Victure PC420 1.1.39 was discovered to contain a hardcoded root password which is stored in plaintext.

  • High 8.8

    Hardcoded Credentals in TNB Mobile Solutions' Cockpit Software

    Use of Hard-coded Credentials vulnerability in TNB Mobile Solutions Cockpit Software allows Read Sensitive Strings Within an Executable. This issue affects Cockpit Software: before v2.13.

  • High 7.3

    demozx gf_cms JWT Authentication auth.go init hard-coded credentials

    A vulnerability was found in demozx gf_cms 1.0/1.0.1. It has been classified as critical. This affects the function init of the file internal/logic/auth/auth.go of the component JWT Authentication. The manipulation leads to hard-coded credentials. It is possi…

  • High 7.5

    Vonets WiFi Bridges Use of Hard-coded Credentials

    Use of hard-coded credentials vulnerability affecting Vonets industrial wifi bridge relays and wifi bridge repeaters, software versions 3.3.23.6.9 and prior, enables an unauthenticated remote attacker to bypass authentication using hard-coded administrator cr…

  • High 8.8

    ZWX-2000CSW2-HN firmware versions prior to Ver.0.3.15 uses hard-coded credentials, which may allow a network-adjacent a…

  • High 8.8

    Agent takeover

    Zohocorp ManageEngine DDI Central versions 4001 and prior were vulnerable to agent takeover vulnerability due to the hard-coded sensitive keys.

  • High 7.5

    A hardcoded privileged ID within Lumisxp v15.0.x to v16.1.x allows attackers to bypass authentication and access intern…

  • High 8.1

    Brocade Fabric OS versions prior to v9.0 have default community strings

    A vulnerability in the default configuration of the Simple Network Management Protocol (SNMP) feature of Brocade Fabric OS versions before v9.0.0 could allow an authenticated, remote attacker to read data from an affected device via SNMP. The vulnerability is…

  • High 7.5

    Hardcoded Credentials

    The configuration file is encrypted with a static key derived from a static five-character password which allows an attacker to decrypt this file. The application hashes this five-character password with the outdated and broken MD5 algorithm (no salt) and use…

  • High 8.8

    D-Link router - Hidden Backdoor

    Certain models of D-Link wireless routers contain an undisclosed factory testing backdoor. Unauthenticated attackers on the local area network can force the device to enable Telnet service by accessing a specific URL and can log in by using the administrator …

  • High 7.4

    Hardcoded credentials for WebDAV access

    It was observed that all the Toshiba printers contain credentials used for WebDAV access in the readable file. Then, it is possible to get a full access with WebDAV to the printer. As for the affected products/models/versions, see the reference URL.

  • High 7.1

    Hardcoded keys used to generate authentication cookies

    It appears that some hardcoded keys are used for authentication to internal API. Knowing these private keys may allow attackers to bypass authentication and reach administrative interfaces. As for the affected products/models/versions, see the reference URL.

  • High 8.6

    Use of Hard-coded Credentials in Motorola Solutions Vigilant Fixed LPR Coms Box (BCAV1F2-C600)

    An attacker can access the maintenance console using hard coded credentials for a hidden wireless network on the device.

  • High 8.8

    D-Link DIR-605L v2.13B01 was discovered to contain a hardcoded password vulnerability in /etc/passwd, which allows atta…

  • High 7.8

    CWE-798: Use of hard-coded credentials vulnerability exists that could cause local privilege escalation when logged in …

  • High 8.8

    Precor touchscreen console P82 contains a private SSH key that corresponds to a default public key. A remote attacker c…

  • High 8.8

    Precor touchscreen console P62, P80, and P82 could allow a remote attacker to obtain sensitive information because the …

  • High 8.0

    Precor touchscreen console P62, P80, and P82 contains a default SSH public key in the authorized_keys file. A remote at…

  • High 7.8

    Precor touchscreen console P62, P80, and P82 could allow a remote attacker (within the local network) to bypass securit…