Goal Reached Thanks to every supporter — we hit 100%!

Goal: 1000 CNY · Raised: 1336 CNY

100%

CWE-798 (使用硬编码的凭证) — Vulnerability Class 684

684 vulnerabilities classified as CWE-798 (使用硬编码的凭证). AI Chinese analysis included.

CWE-798 represents a critical security weakness where authentication mechanisms rely on static, embedded credentials rather than dynamic verification. This flaw typically manifests as default administrative accounts with simple, hard-coded passwords or cryptographic keys stored directly within the source code or configuration files. Attackers exploit this vulnerability by scanning for these predictable credentials, gaining immediate, unauthorized access to sensitive systems without needing to bypass complex security controls. To mitigate this risk, developers must eliminate static secrets entirely, implementing robust credential management solutions such as secure vaults, environment variables, or hardware security modules. Additionally, enforcing strong password policies, regular key rotation, and multi-factor authentication ensures that access rights are dynamic and secure, significantly reducing the attack surface against unauthorized entry.

MITRE CWE Description
The product contains hard-coded credentials, such as a password or cryptographic key. There are two main variations: Inbound: the product contains an authentication mechanism that checks the input credentials against a hard-coded set of credentials. In this variant, a default administration account is created, and a simple password is hard-coded into the product and associated with that account. This hard-coded password is the same for each installation of the product, and it usually cannot be changed or disabled by system administrators without manually modifying the program, or otherwise patching the product. It can also be difficult for the administrator to detect. Outbound: the product connects to another system or component, and it contains hard-coded credentials for connecting to that component. This variant applies to front-end systems that authenticate with a back-end service. The back-end service may require a fixed password that can be easily discovered. The programmer may simply hard-code those back-end credentials into the front-end product.
Common Consequences (2)
Access Control Bypass Protection Mechanism
If hard-coded passwords are used, it is almost certain that malicious users will gain access to the account in question. Any user of the product that hard-codes passwords may be able to extract the password. Client-side systems with hard-coded passwords pose even more of a threat, since the extracti…
Integrity, Confidentiality, Availability, Access Control, Other Read Application Data, Gain Privileges or Assume Identity, Execute Unauthorized Code or Commands, Other
This weakness can lead to the exposure of resources or functionality to unintended actors, possibly providing attackers with sensitive information or even execute arbitrary code. If the password is ever discovered or published (a common occurrence on the Internet), then anybody with knowledge of thi…
Mitigations (5)
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 …
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.
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.
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 ra…
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 th…
Examples (2)
The following code uses a hard-coded password to connect to a database:
... DriverManager.getConnection(url, "scott", "tiger"); ...
Bad · Java
javap -c ConnMngr.class 22: ldc #36; //String jdbc:mysql://ixne.com/rxsql 24: ldc #38; //String scott 26: ldc #17; //String tiger
Attack
The following code is an example of an internal hard-coded password in the back-end:
int VerifyAdmin(char *password) { if (strcmp(password, "Mew!")) { printf("Incorrect Password!\n"); return(0) } printf("Entering Diagnostic Mode...\n"); return(1); }
Bad · C
int VerifyAdmin(String password) { if (!password.equals("Mew!")) { return(0) } //Diagnostic Mode return(1); }
Bad · Java
CVE ID Title CVSS Severity Published
CVE-2026-47847 Bitnami MariaDB Galera 信任管理问题漏洞 — bitnami/mariadb-galera 5.3 Medium 2026-06-18
CVE-2025-10560 Hardcoded cloud credentials in Worksnaps client application binaries expose production cloud resources — Worksnaps.net Worksnaps - - 2026-06-18
CVE-2026-5667 Information Disclosure, Information Tampering, or Denial-of-Service (DoS) Vulnerability in Multiple Home Appliances — Room Air Conditioners (for Japan) MSZ-BKR2223-W - - 2026-06-17
CVE-2026-22312 Use of Hard-coded Credentials Vulnerability in Radiflow iSAP Smart Collector — iSAP Smart Collector 8.6 High 2026-06-16
CVE-2026-50083 Aqara hardcoded OAuth client credentials — Aquara IAM/SSO Gateway 9.1 Critical 2026-06-12
CVE-2026-10557 Yarbo Android/iOS Mobile Application and Cloud Infrastructure Use of Hard-coded Credentials — Yarbo Android/IOS mobile application 9.8 Critical 2026-06-12
CVE-2026-11849 IEI Integration Corp|iRM-IEI Remote Management - Hard-coded Credentials — iRM-TSi410X 9.8 Critical 2026-06-12
CVE-2026-11414 Unauthenticated File Exfiltration in Altium Enterprise Server Vault Service via Hard-coded Cryptographic Key and Path Traversal — Altium Enterprise Server - - 2026-06-05
CVE-2025-71317 NetMan 204 Hard-coded Backdoor Credentials — NetMan 204 9.8 Critical 2026-06-05
CVE-2026-21404 NAVTOR NavBox Use of Hard-coded Credentials — NavBox 6.3 Medium 2026-06-04
CVE-2026-50213 Bulk User Private Data Harvesting — Connect M6E 5G Portable WiFi Router - - 2026-06-04
CVE-2026-49204 Hard-coded AWS Cognito Testing Accounts — Connect M6E 5G Portable WiFi Router - - 2026-06-04
CVE-2019-25722 Dräger SC Monitoring Devices Hard-coded Credentials and DoS — SC 6002XL 7.6 High 2026-06-02
CVE-2026-42251 Hard-coded credentials in KS-SOMED — KS-SOMED - - 2026-06-01
CVE-2026-25600 Credential Exposure Vulnerability in Trac PDBM — PDBM 6.4 Medium 2026-06-01
CVE-2026-44825 Apache Solr: Enabling BasicAuth using bin/solr CLI configures additional insecure users — Apache Solr 8.1 High 2026-06-01
CVE-2026-42929 MacGregor Voyage Data Recorder (VDR) G4e Use of Hard-coded Credentials — MacGregor Voyage Data Recorder (VDR) G4e 8.3 High 2026-05-29
CVE-2026-7786 Jinan USR IOT Technology Limited (PUSR) USR-W610 RS232/485 to Wi-Fi/Ethernet Converter Use of Hard-coded Credentials — USR-W610 RS232/485 to Wi-Fi/Ethernet Converter 9.8 Critical 2026-05-29
CVE-2026-45631 Dokploy: Pre-Auth Admin Takeover via Hardcoded Authentication Secret — dokploy 10.0 Critical 2026-05-29
CVE-2026-46376 FreePBX: Unauthenticated Use of Hard-Coded Credentials Vulnerability in FreePBX UCP Interface — security-reporting - - 2026-05-29
CVE-2026-49201 Acer Wave 7 router: Hardcoded Cryptographic Key — Wave 7 router - - 2026-05-29
CVE-2026-45039 RustFS: Internode RPC HMAC secret falls back to public default credential, enabling peer impersonation — rustfs 9.8 Critical 2026-05-28
CVE-2026-24444 SDMC NE6037 Hardcoded Password via mgmt.php/npcmd.php — NE6037 9.8 Critical 2026-05-28
CVE-2026-5065 IBM Controller is affected by vulnerabilities — Controller 8.8 High 2026-05-27
CVE-2026-48245 Open ISES Tickets < 3.44.2 Hardcoded Google Maps API Key in tables.php — Tickets 5.3 Medium 2026-05-21
CVE-2026-48244 Open ISES Tickets < 3.44.2 Hardcoded Google Maps API Key in settings.inc.php — Tickets 5.3 Medium 2026-05-21
CVE-2026-48243 Open ISES Tickets < 3.44.2 Hardcoded WhitePages API Key in wp1.php — Tickets 5.3 Medium 2026-05-21
CVE-2026-48242 Open ISES Tickets < 3.44.2 Hardcoded MySQL Database Credentials in import_mdb.php — Tickets 8.1 High 2026-05-21
CVE-2026-48241 Open ISES Tickets < 3.44.2 Hardcoded MySQL Database Credentials in loader.php — Tickets 8.1 High 2026-05-21
CVE-2026-9139 Taiko AG1000-01A Rev 7.3/8 Hard-coded Credentials via login.zhtml — AG1000-01A SMS Alert Gateway 9.8 Critical 2026-05-20

Vulnerabilities classified as CWE-798 (使用硬编码的凭证) represent 684 CVEs. The CWE taxonomy describes the weakness; review individual CVEs for product-specific impact.