| Título | xuey490 FssAdmin up to f037899 (2026-11-11) Code Injection |
|---|
| Descripción | A code injection vulnerability was found in FssAdmin (https://github.com/xuey490/FssAdmin_php), a PHP admin platform based on the Webman framework. The code generator module (/api/tool/code/*) in server/app/Services/ToolGenerateService.php stores the user-controlled parameters class_name, package_name, business_name and table_comment in the database without any format validation (function updateConfig). The generateFile function interpolates these values unsanitized both into the output file path (app/Controllers/{$packageName}/{$className}Controller.php, function buildFilePaths) and into the generated PHP source code (heredoc templates in functions renderController/renderService). A remote authenticated attacker with the tool:code:edit permission can exploit path traversal (package_name=..) to write arbitrary files outside the project directory and inject arbitrary PHP code into the generated file, resulting in arbitrary file write and remote code execution. Affected version: latest master, commit f037899 (2026-11-11). Attack vector: PUT /api/tool/code/update to store a malicious config, followed by POST /api/tool/code/generateFile to trigger file creation. Affected file: server/app/Services/ToolGenerateService.php (functions updateConfig, buildFilePaths, generateFile, renderController). Affected parameters: class_name, package_name, business_name, table_comment. CVSS 3.1 vector: CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H (7.2 High). Mitigation: validate class_name with ^[A-Za-z_][A-Za-z0-9_]*$, reject path separators and dot segments in package_name/business_name, verify with realpath() that the final path stays inside the project root, and escape dynamic template variables. The vendor will be notified through GitHub. |
|---|
| Fuente | ⚠️ https://github.com/xuey490/FssAdmin_php/issues/12 |
|---|
| Usuario | muzhi (UID 102993) |
|---|
| Sumisión | 2026-11-13 07:53 (hace 24 días) |
|---|
| Moderación | 2026-12-06 22:10 (24 days later) |
|---|
| Estado | Aceptado |
|---|
| Entrada de VulDB | 450894 [xuey490 FssAdmin hasta f0378993d64408c4ecbf97a262060340df6b18c0 Code Generator ToolGenerateService.php buildFilePaths package_name recorrido de directorios] |
|---|
| Puntos | 20 |
|---|