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

1,055 results · Feed

  • Critical 9.1

    ifm: Hardcoded telnet credentials in Smart PLC

    An high privileged remote attacker can enable telnet access that accepts hardcoded credentials.

  • Critical 9.8

    ifm: Use of Hard-coded Credentials

    An unauthenticated remote attacker can use the hard-coded credentials to access the SmartSPS devices with high privileges.

  • Critical 9.8

    Use of Hard-coded Credentials in Kiloview P1/P2 devices

    Hardcoded credentials are discovered within the application's source code, creating a potential security risk for unauthorized access.

  • Medium 4.0

    "Piccoma" App for Android and iOS versions prior to 6.20.0 uses a hard-coded API key for an external service, which may…

  • Critical 9.3

    Use of Hard-coded Credentials in TELSAT marKoni FM Transmitter

    TELSAT marKoni FM Transmitters are vulnerable to an attacker exploiting a hidden admin account that can be accessed through the use of hard-coded credentials.

  • Critical 9.8

    Improper Access Control in Talya Informatics' Elektraweb

    Missing Authentication, Files or Directories Accessible to External Parties, Use of Hard-coded Credentials vulnerability in Talya Informatics Elektraweb allows Authentication Bypass. This issue affects Elektraweb: before v17.0.68.

  • Critical 9.8

    luci-app-lucky v2.8.3 was discovered to contain hardcoded credentials.

  • 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…

  • Critical 9.3

    Hard Coded Credential

    Use of Hard-coded Credentials vulnerability in Baicells Snap Router BaiCE_BMI on EP3011 (User Passwords modules) allows unauthorized access to the device.

  • 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…

  • Critical 9.8

    Use of hard-coded credentials issue exists in Ricoh Streamline NX PC Client ver.3.7.2 and earlier. If this vulnerabilit…

  • 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 …

  • Critical 9.8

    Shenzhen Guoxin Synthesis image system before 8.3.0 has a 123456Qw default password.

  • 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.

  • Medium 6.2

    Hardcoded password used to encrypt files

    all the Toshiba printers have programs containing a hardcoded key used to encrypt files. An attacker can decrypt the encrypted files using the hardcoded key. Insecure algorithm is used for the encryption. This vulnerability can be executed in combination with…

  • Medium 6.2

    Hardcoded password used to encrypt logs and use of weak cipher

    All the Toshiba printers contain a shell script using the same hardcoded key to encrypt logs. An attacker can decrypt the encrypted files using the hardcoded key. This vulnerability can be executed in combination with other vulnerabilities and difficult to ex…

  • Medium 6.2

    Hardcoded password used to encrypt logs

    All the Toshiba printers contain a shell script using the same hardcoded key to encrypt logs. An attacker can decrypt the encrypted files using the hardcoded key. This vulnerability can be executed in combination with other vulnerabilities and difficult to ex…

  • 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 …

  • Critical 9.8

    Apache Submarine Commons Utils: default secret

    ** UNSUPPORTED WHEN ASSIGNED ** Improper Authentication vulnerability in Apache Submarine Commons Utils. If the user doesn't explicitly set `submarine.auth.default.secret`, a default value will be used. This issue affects Apache Submarine Commons Utils: from …

  • Critical 9.0
    CVE-2024-29855 Public exploit EPSS 22%

    Hard-coded JWT secret allows authentication bypass in Veeam Recovery Orchestrator

  • 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…

  • Critical 9.8
    CVE-2024-3408 Public exploit Scanner template EPSS 78%

    Authentication Bypass and RCE in man-group/dtale

    man-group/dtale version 3.10.0 is vulnerable to an authentication bypass and remote code execution (RCE) due to improper input validation. The vulnerability arises from a hardcoded `SECRET_KEY` in the flask configuration, allowing attackers to forge a session…

  • High 8.1

    Dell PowerScale OneFS versions 8.2.x through 9.8.0.x contain a use of hard coded credentials vulnerability. An adjacent…

  • Critical 9.8

    TOTOLINK CP300 V2.0.4-B20201102 was discovered to contain a hardcoded password vulnerability in /etc/shadow.sample, whi…

  • Critical 9.8

    MinMax CMS - Hidden Functionality

    MinMax CMS from MinMax Digital Technology contains a hidden administrator account with a fixed password that cannot be removed or disabled from the management interface. Remote attackers who obtain this account can bypass IP access control restrictions and lo…

  • Medium 6.5

    Aptos Wisal payroll accounting before 7.1.6 uses hardcoded credentials in the Windows client to fetch the complete list…

  • High 7.5

    'OfferBox' App for Android versions 2.0.0 to 2.3.17 and 'OfferBox' App for iOS versions 2.1.7 to 2.6.14 use a hard-code…

  • High 7.5

    Hardcoded credentials vulnerability in Trellix ePolicy Orchestrator (ePO) on Premise prior to 5.10 Service Pack 1 Updat…

  • Critical 9.8

    CyberPower PowerPanel business Use of Hard-coded Credentials

    Hard-coded credentials are used by the  CyberPower PowerPanel platform to authenticate to the database, other services, and the cloud. This could result in an attacker gaining access to services with the privileges of a Powerpanel business application.

  • Critical 9.6

    Weak account password in GE HealthCare EchoPAC products

    Weak account password in GE HealthCare EchoPAC products

  • Critical 9.8

    A vulnerability has been identified in SIMATIC CN 4100 (All versions < V3.0). The affected device contains undocumented…

  • High 8.6

    Sangoma FreePBX 1805 through 2203 on Linux contains hardcoded credentials for the Asterisk REST Interface (ARI), which …

  • High 8.6
    CVE-2024-34219 EPSS 21%

    TOTOLINK CP450 V4.1.0cu.747_B20191224 was discovered to contain a vulnerability in the SetTelnetCfg function, which all…