FixVibe
Covered by FixVibehigh

通过模板标签在 SPIP 中远程执行代码 (CVE-2016-7998) ZXCVFIXVIBESEND ZXCVFIXVIBESEG1 SPIP 3.1.2 及更早版本容易通过上传的 HTML 文件中的恶意模板标签受到远程执行代码的攻击。 ZXCVFIXVIBESEND ZXCVFIXVIBESEG2 SPIP 版本 3.1.2 及更早版本在模板编辑器中包含漏洞。经过身份验证的攻击者可以上传带有精心设计的 INCLUDE 或 INCLURE 标记的 HTML 文件,以在服务器上执行任意 PHP 代码。 ZXCVFIXVIBESEND ZXCVFIXVIBESEG3 ## 影响 ZXCVFIXVIBESEND ZXCVFIXVIBESEG4 经过身份验证的攻击者可以在底层 Web 服务器 CVE-2016-7998 上执行任意 PHP 代码。这允许完整的系统妥协,包括数据泄露、站点内容修改以及托管环境 ZXCVFIXVIBETOKEN1ZXCV 内的横向移动。 ZXCVFIXVIBESEND ZXCVFIXVIBESEG5 ## 根本原因 ZXCVFIXVIBESEND ZXCVFIXVIBESEG6 该漏洞存在于 SPIP 模板编辑器和编译器组件 ZXCVFIXVIBETOKEN3ZXCV 中。处理上传的文件 ZXCVFIXVIBETOKEN4ZXCV 时,系统无法正确验证或清理特定模板标签内的输入。具体来说,编译器错误地处理 HTML 文件 ZXCVFIXVIBETOKEN5ZXCV 中精心制作的 CVE-2016-7998 或 ZXCVFIXVIBETOKEN1ZXCV 标签。当攻击者通过ZXCVFIXVIBETOKEN2ZXCV操作访问这些上传的文件时,恶意标签将被处理,导致PHP代码执行ZXCVFIXVIBETOKEN6ZXCV。 ZXCVFIXVIBESEND ZXCVFIXVIBESEG7 ## 受影响的版本 ZXCVFIXVIBESEND ZXCVFIXVIBESEG8 * SPIP 版本 3.1.2 和所有先前版本 CVE-2016-7998。 ZXCVFIXVIBESEND ZXCVFIXVIBESEG9 ## 修复 ZXCVFIXVIBESEND ZXCVFIXVIBESEG10 将 SPIP 更新到 3.1.2 以上版本以解决此漏洞 CVE-2016-7998。确保文件上传权限严格限制于受信任的管理用户,并且上传的文件不会存储在 Web 服务器可以将其作为脚本 ZXCVFIXVIBETOKEN1ZXCV 执行的目录中。 ZXCVFIXVIBESEND ZXCVFIXVIBESEG11 ## CVE-2016-7998 如何测试它 ZXCVFIXVIBESEND ZXCVFIXVIBESEG12 CVE-2016-7998主要通过两种方法检测该漏洞: ZXCVFIXVIBESEND ZXCVFIXVIBESEG13 1. **被动指纹识别:** 通过分析HTTP响应头或HTML源中的特定元标记,ZXCVFIXVIBETOKEN2ZXCV可以识别SPIP CVE-2016-7998的运行版本。如果版本为3.1.2或更低,则会触发高严重性警报ZXCVFIXVIBETOKEN1ZXCV。 ZXCVFIXVIBESEND ZXCVFIXVIBESEG14 2. **存储库扫描:** 对于连接 ZXCVFIXVIBETOKEN2ZXCV 存储库的用户,ZXCVFIXVIBETOKEN1ZXCV 的存储库扫描器可以检查 SPIP 源代码中的依赖文件或版本定义常量,以识别易受攻击的安装 CVE-2016-7998。

SPIP versions 3.1.2 and earlier contain a vulnerability in the template composer. Authenticated attackers can upload HTML files with crafted INCLUDE or INCLURE tags to execute arbitrary PHP code on the server.

CVE-2016-7998CWE-20

Impact

An authenticated attacker can execute arbitrary PHP code on the underlying web server [S1]. This allows for complete system compromise, including data exfiltration, modification of site content, and lateral movement within the hosting environment [S1].

Root Cause

The vulnerability exists in the SPIP template composer and compiler components [S1]. The system fails to properly validate or sanitize input within specific template tags when processing uploaded files [S1]. Specifically, the compiler incorrectly handles crafted INCLUDE or INCLURE tags inside HTML files [S1]. When an attacker accesses these uploaded files through the valider_xml action, the malicious tags are processed, leading to PHP code execution [S1].

Affected Versions

  • SPIP versions 3.1.2 and all prior versions [S1].

Remediation

Update SPIP to a version newer than 3.1.2 to address this vulnerability [S1]. Ensure that file upload permissions are strictly restricted to trusted administrative users and that uploaded files are not stored in directories where the web server can execute them as scripts [S1].

How FixVibe tests for it

FixVibe could detect this vulnerability through two primary methods:

  • Passive Fingerprinting: By analyzing HTTP response headers or specific meta tags in the HTML source, FixVibe can identify the running version of SPIP [S1]. If the version is 3.1.2 or lower, it would trigger a high-severity alert [S1].
  • Repository Scanning: For users who connect their GitHub repositories, FixVibe's repo scanner can inspect dependency files or version-defining constants in the SPIP source code to identify vulnerable installations [S1].