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

目标: 1000 元 · 已筹: 1325

100%

CWE-767 通过公开方法可访问到关键的私有数据 类漏洞列表 4

CWE-767 通过公开方法可访问到关键的私有数据 类弱点 4 条 CVE 漏洞汇总,含 AI 中文分析。

CWE-767指通过公共方法访问关键私有变量,属于访问控制缺陷。攻击者利用公共接口读取敏感数据或篡改变量值,破坏代码内部假设并引发逻辑错误。开发者应避免暴露私有成员,通过封装限制访问权限,或在公共方法中加入严格的输入验证与状态检查,确保变量状态符合预期,从而防止信息泄露及后续攻击。

MITRE CWE 官方描述
CWE:CWE-767 通过公共方法访问关键私有变量 英文:产品定义了一个读取或修改私有变量的公共方法。 如果攻击者将变量修改为包含意外值,这可能会违反代码其他部分的假设。此外,如果攻击者能够读取私有变量,它可能会暴露敏感信息或使发动进一步攻击变得更加容易。
常见影响 (1)
Integrity, OtherModify Application Data, Other
缓解措施 (1)
ImplementationUse class accessor and mutator methods appropriately. Perform validation when accepting data from a public method that is intended to modify a critical private variable. Also be sure that appropriate access controls are being applied when a public method interfaces with critical data.
代码示例 (2)
The following example declares a critical variable to be private, and then allows the variable to be modified by public methods.
private: float price; public: void changePrice(float newPrice) { price = newPrice; }
Bad · C++
The following example could be used to implement a user forum where a single user (UID) can switch between multiple profiles (PID).
public class Client { private int UID; public int PID; private String userName; public Client(String userName){ PID = getDefaultProfileID(); UID = mapUserNametoUID( userName ); this.userName = userName; } public void setPID(int ID) { UID = ID; } }
Bad · Java
CVE ID标题CVSS风险等级Published
CVE-2024-36463 Zabbix 安全漏洞 — Zabbix 6.5 Medium2024-11-26
CVE-2024-34162 Sharp MFP 安全漏洞 — Multiple MFPs (multifunction printers) 5.3 Medium2024-11-26
CVE-2020-26868 ARC Informatique PcVue 安全漏洞 — PcVue 7.5 High2020-10-12
CVE-2016-8380 Phoenix Contact ILC PLC 授权问题漏洞 — Phoenix Contact ILC PLCs 7.3 -2018-04-05

CWE-767(通过公开方法可访问到关键的私有数据) 是常见的弱点类别,本平台收录该类弱点关联的 4 条 CVE 漏洞。