目标达成 感谢每一位支持者 — 我们达成了 100% 目标!

目标: 1000 元 · 已筹: 1000

100.0%

CWE-798 使用硬编码的凭证 类漏洞列表 559

CWE-798 使用硬编码的凭证 类弱点 559 条 CVE 漏洞汇总,含 AI 中文分析。

CWE-798指硬编码凭据漏洞,即软件将密码或密钥直接写入代码。攻击者可通过逆向工程提取这些固定凭据,从而绕过认证机制获取未授权访问权限。为避免此类风险,开发者应严禁在代码中硬编码敏感信息,转而采用环境变量、密钥管理系统或配置数据库等动态方式存储凭据,确保凭据与代码分离,提升系统安全性。

MITRE CWE 官方描述
CWE:CWE-798 使用硬编码凭证 (Use of Hard-coded Credentials) 英文:该产品包含硬编码凭证 (hard-coded credentials),例如密码 (password) 或加密密钥 (cryptographic key)。 主要有两种变体: 入站 (Inbound):该产品包含一种身份验证机制,将输入的凭证 (input credentials) 与一组硬编码凭证 (hard-coded set of credentials) 进行比对。在此变体中,会创建一个默认的管理员账户 (default administration account),并将一个简单的密码 (simple password) 硬编码到产品中并与该账户关联。此硬编码密码 (hard-coded password) 在产品的每次安装中都是相同的,并且通常无法由系统管理员 (system administrators) 在不手动修改程序或修补产品的情况下更改或禁用。管理员也难以检测到此问题。 出站 (Outbound):该产品连接到另一个系统或组件,并包含用于连接该组件的硬编码凭证 (hard-coded credentials)。此变体适用于与后端服务 (back-end service) 进行身份验证的前端系统 (front-end systems)。后端服务 (back-end service) 可能需要一个容易被发现的固定密码 (fixed password)。程序员可能只是将这些后端凭证 (back-end credentials) 硬编码到前端产品 (front-end product) 中。
常见影响 (2)
Access ControlBypass 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, OtherRead 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…
缓解措施 (5)
Architecture and DesignFor 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 DesignFor 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 DesignIf 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 DesignFor 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 DesignFor 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…
代码示例 (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标题CVSS风险等级Published
CVE-2026-7414 Yarbo机器人固件硬编码凭证漏洞 — Firmware 9.8 Critical2026-05-07
CVE-2026-8032 PicoTronica e-Clinic echs.js硬编码凭据漏洞 — e-Clinic Healthcare System ECHS 7.3 High2026-05-06
CVE-2026-32834 Easy PayPal Events & Tickets 1.3 通过QR码扫描身份验证绕过漏洞 — easy-paypal-events-tickets 7.5 High2026-05-04
CVE-2026-42376 D-Link DIR-456U A1 Telnet硬编码凭证漏洞 — DIR-456U Firmware 9.8 Critical2026-05-04
CVE-2026-42375 D-Link DIR-600L A1 Telnet硬编码后门漏洞 — DIR-600L Firmware 9.8 Critical2026-05-04
CVE-2026-42374 D-Link DIR-600L B1 硬编码 Telnet 后门凭证漏洞 — DIR-600L Firmware 9.8 Critical2026-05-04
CVE-2026-42373 D-Link DIR-605L B2 硬编码 Telnet 后门凭证漏洞 — DIR-605L Firmware 9.8 Critical2026-05-04
CVE-2026-42372 D-Link DIR-605L A1 Telnet后门凭证漏洞 — DIR-605L Firmware 8.8 High2026-05-04
CVE-2026-7579 AstrBot Dashboard auth.py 硬编码凭据漏洞 — AstrBot 7.3 High2026-05-01
CVE-2026-27785 Milesight AIOT camera 信任管理问题漏洞 — MS-Cxx63-PD 8.8 High2026-04-27
CVE-2026-35503 SenseLive X3050 信任管理问题漏洞 — X3050 9.8 Critical2026-04-23
CVE-2026-6610 DjangoBlog 安全漏洞 — DjangoBlog 3.7 Low2026-04-20
CVE-2026-6578 DjangoBlog 安全漏洞 — DjangoBlog 5.6 Medium2026-04-19
CVE-2026-6574 LightPicture 安全漏洞 — LightPicture 7.3 High2026-04-19
CVE-2026-5189 Sonatype Nexus Repository Manager 安全漏洞 — Nexus Repository 9.8 -2026-04-15
CVE-2026-4832 Schneider Electric多款产品 信任管理问题漏洞 — Easergy MiCOM P14x 7.5 -2026-04-14
CVE-2026-1233 WordPress plugin Text to Speech for WP (AI Voices by Mementor) 信任管理问题漏洞 — Text to Speech – TTSWP 7.5 High2026-04-04
CVE-2017-20234 Belden GarrettCom Magnum 6K和Belden GarrettCom Magnum 10K 信任管理问题漏洞 — GarrettCom Magnum 6K and 10K Managed Switches 9.8 Critical2026-04-03
CVE-2025-10681 Gardyn Home Kit Cloud API和Gardyn Mobile Application 信任管理问题漏洞 — Mobile Application 8.6 High2026-04-03
CVE-2026-25601 MEPIS RM 安全漏洞 — MEPIS RM 6.4 Medium2026-04-01
CVE-2026-1612 AL-KO Robolinho Update Software 信任管理问题漏洞 — Robolinho Update Software 9.1 -2026-03-30
CVE-2025-9497 Microchip Time Provider 4100 安全漏洞 — Time Provider 4100 9.8 -2026-03-28
CVE-2026-4993 OpenUI 信任管理问题漏洞 — OpenUI 3.3 Low2026-03-28
CVE-2025-55262 HCL Aftermarket DPC SQL注入漏洞 — Aftermarket DPC 8.3 High2026-03-26
CVE-2025-55263 HCL Aftermarket DPC 安全漏洞 — Aftermarket DPC 7.3 High2026-03-26
CVE-2025-12708 IBM Concert 信任管理问题漏洞 — Concert 6.2 Medium2026-03-25
CVE-2026-27073 WordPress plugin Addi 信任管理问题漏洞 — Addi – Cuotas que se adaptan a ti 7.5 High2026-03-25
CVE-2026-1958 KlinikaXP Klinika XP和KlinikaXP Insertino 信任管理问题漏洞 — KlinikaXP Insertino 9.8 -2026-03-23
CVE-2026-22900 QNAP Systems QuNetSwitch 信任管理问题漏洞 — QuNetSwitch 9.8 -2026-03-20
CVE-2026-33072 FileRise 安全漏洞 — FileRise 8.2 High2026-03-20

CWE-798(使用硬编码的凭证) 是常见的弱点类别,本平台收录该类弱点关联的 559 条 CVE 漏洞。