CWE-271 特权放弃/降低错误

admin 2022年1月5日21:05:11评论42 views字数 4813阅读16分2秒阅读模式

CWE-271 特权放弃/降低错误

Privilege Dropping / Lowering Errors

结构: Simple

Abstraction: Class

状态: Incomplete

被利用可能性: High


The software does not drop privileges before passing control of a resource to an actor that does not have those privileges.


In some contexts, a system executing with elevated permissions will hand off a process/file/etc. to another process or user. If the privileges of an entity are not reduced, then elevated privileges are spread throughout a system and possibly to an attacker.


  • cwe_Nature: ChildOf cwe_CWE_ID: 269 cwe_View_ID: 1000 cwe_Ordinal: Primary


Language: {'cwe_Class': 'Language-Independent', 'cwe_Prevalence': 'Undetermined'}


范围 影响 注释
Access Control Gain Privileges or Assume Identity If privileges are not dropped, neither are access rights of the user. Often these rights can be prevented from being dropped.
['Access Control', 'Non-Repudiation'] ['Gain Privileges or Assume Identity', 'Hide Activities'] If privileges are not dropped, in some cases the system may record actions as the user which is being impersonated rather than the impersonator.


MIT-46 Architecture and Design

策略: Separation of Privilege

Compartmentalize the system to have "safe" areas where trust boundaries can be unambiguously drawn. Do not allow sensitive data to go outside of the trust boundary and always be careful when interfacing with a compartment outside of the safe area.
Ensure that appropriate compartmentalization is built into the system design and that the compartmentalization serves to allow for and further reinforce privilege separation functionality. Architects and designers should rely on the principle of least privilege to decide when it is appropriate to use and to drop system privileges.

MIT-1 ['Architecture and Design', 'Operation']


Very carefully manage the setting, management, and handling of privileges. Explicitly manage trust zones in the software.

MIT-49 Architecture and Design

策略: Separation of Privilege

Consider following the principle of separation of privilege. Require multiple conditions to be met before permitting access to a system resource.


The following code calls chroot() to restrict the application to a subset of the filesystem below APP_HOME in order to prevent an attacker from using the program to gain unauthorized access to files located elsewhere. The code then opens a file specified by the user and processes the contents of the file.

bad C

FILE* data = fopen(argv[1], "r+");

Constraining the process inside the application's home directory before opening any files is a valuable security measure. However, the absence of a call to setuid() with some non-zero value means the application is continuing to operate with unnecessary root privileges. Any successful exploit carried out by an attacker against the application can now result in a privilege escalation attack because any malicious operations will be performed with the privileges of the superuser. If the application drops to the privilege level of a non-root user, the potential for damage is substantially reduced.


标识 说明 链接
CVE-2000-1213 Program does not drop privileges after acquiring the raw socket.
CVE-2001-0559 Setuid program does not drop privileges after a parsing error occurs, then calls another program to handle the error.
CVE-2001-0787 Does not drop privileges in related groups when lowering privileges.
CVE-2002-0080 Does not drop privileges in related groups when lowering privileges.
CVE-2001-1029 Does not drop privileges before determining access to certain files.
CVE-1999-0813 Finger daemon does not drop privileges when executing programs on behalf of the user being fingered.
CVE-1999-1326 FTP server does not drop privileges if a connection is aborted during file transfer.
CVE-2000-0172 Program only uses seteuid to drop privileges.
CVE-2004-2504 Windows program running as SYSTEM does not drop privileges before executing other programs (many others like this, especially involving the Help facility).
CVE-2004-0213 Utility Manager launches winhlp32.exe while running with raised privileges, which allows local users to gain system privileges.
CVE-2004-0806 Setuid program does not drop privileges before executing program specified in an environment variable.
CVE-2004-0828 Setuid program does not drop privileges before processing file specified on command line.
CVE-2004-2070 Service on Windows does not drop privileges before using "view file" option, allowing code execution.



映射的分类名 ImNode ID Fit Mapped Node Name
PLOVER Privilege Dropping / Lowering Errors



特别标注: 本站(CN-SEC.COM)所有文章仅供技术研究,若将其信息做其他用途,由用户承担全部法律及连带责任,本站不承担任何法律及连带责任,请遵守中华人民共和国安全法.
  • 我的微信
  • 微信扫一扫
  • weinxin
  • 我的微信公众号
  • 微信扫一扫
  • weinxin
  • 本文由 发表于 2022年1月5日21:05:11
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                  CWE-271 特权放弃/降低错误


匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: