제출 #1094196: xuey490 FssAdmin up to f037899 (2026-11-11) Code Injection정보

제목xuey490 FssAdmin up to f037899 (2026-11-11) Code Injection
설명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.
원천⚠️ https://github.com/xuey490/FssAdmin_php/issues/12
사용자
 muzhi (UID 102993)
제출2026. 11. 13. AM 07:53 (24 날 ago)
모더레이션2026. 12. 06. PM 10:10 (24 days later)
상태수락
VulDB 항목450894 [xuey490 FssAdmin 까지 f0378993d64408c4ecbf97a262060340df6b18c0 Code Generator ToolGenerateService.php buildFilePaths package_name 디렉토리 순회]
포인트들20

Do you want to use VulDB in your project?

Use the official API to access entries easily!