| Title | https://gitee.com/sanluan/PublicCMS PublicCMS 5.0 Server-Side Template Injection |
|---|
| Description | The `templateResult` directive of PublicCMS compiles and executes the request parameter `templateContent` directly as FreeMarker template source code, with no content validation or expression-whitelist restriction.
This directive is exposed through the `/api/directive/tools/templateResult` endpoint and only requires a valid `appToken` header. Any caller holding this credential can submit arbitrary FreeMarker template syntax, which the server evaluates and echoes back.
Testing confirmed that the server executes the submitted FreeMarker expressions (`${1+1}` returns `2`) and can read internal information such as the FreeMarker engine version and locale. Because this version of FreeMarker enables `ALLOWS_NOTHING_RESOLVER`, the `?new` built-in is disabled, so dangerous classes such as `freemarker.template.utility.Execute` could not be instantiated; therefore remote code execution was not achieved in this report. |
|---|
| Source | ⚠️ https://github.com/sikii7/CVE-md/blob/main/PublicCMS-V5/templateResult-Template-Injection.md |
|---|
| User | sikii (UID 47840) |
|---|
| Submission | 11/06/2026 10:59 (26 days ago) |
|---|
| Moderation | 12/02/2026 19:20 (26 days later) |
|---|
| Status | Duplicate |
|---|
| VulDB entry | 364328 [Sanluan PublicCMS 5.202506.d templateResult API TemplateResultDirective.java execute templateContent special elements in template engine] |
|---|
| Points | 0 |
|---|