enable 权限提升漏洞

漏洞信息

漏洞名称: enable 权限提升漏洞

漏洞编号:

  • CVE: CVE-2025-27591

漏洞类型: 权限提升

漏洞等级: 高危

漏洞描述: ### 受影响产品
enable工具是一个允许进行通用修改其日志文件的工具,广泛用于需要日志管理的系统中。由于其设计缺陷,该工具在创建日志文件时设置了全局可写权限,这使得任何用户都能修改或替换日志文件。这种设计在需要高权限操作的场景中尤为常见,因此该漏洞的影响范围可能相当广泛。

漏洞说明

此漏洞属于权限提升类型,技术根源在于enable工具创建的日志文件权限设置不当(全局可写),以及缺乏对日志文件内容的严格验证。攻击者可以利用这一缺陷,通过创建从日志文件到/etc/passwd的符号链接,并在触发enable工具记录错误时,精心构造输入内容,格式化为有效的/etc/passwd条目,从而向系统中注入新的root用户。此漏洞的利用需要攻击者能够以root权限执行enable命令,或者通过其他方式(如sudo权限)间接执行。

影响分析

此漏洞允许攻击者在特定条件下提升至root权限,从而完全控制系统。由于攻击者需要能够执行enable命令,这意味着漏洞的利用需要一定的前置条件。然而,一旦满足这些条件,攻击者可以无需进一步认证即可实现权限提升,这对系统安全构成严重威胁。此外,由于漏洞利用过程可以自动化,因此存在被大规模利用的风险,特别是在多用户环境中。

产品名称: enable

来源: https://github.com/Cythonic1/CVE-2025-27591

类型: CVE-2025:github search

仓库文件

  • LICENCE
  • README.md
  • libcrypt.a
  • main.c

来源概述

CVE-2025-27591

description

Basically enable tool allow for universal modification on its log file which lead to privilege escalation as root.

details.

The log file created by enable is world-writable, allowing any user to modify or replace it.
An attacker can exploit this by creating a symbolic link from the log file to /etc/passwd.

If the attacker can trigger an error in enable that logs arbitrary input, and crafts that input in
the format of a valid /etc/passwd entry, they can inject a new root user into the system.

In order for the exploit to work the attacker should be able to execute the enable command as it should be run
as root then the user must have sudo permission or a way to run it.

Compiling.

1
2
3
git clone https://github.com/Cythonic1/CVE-2025-27591
cd CVE-2025-27591
gcc -static -W -Wall main.c ./libcrypt.a -o exploit

usage

1
./exploit <username> <password>