Plenti - Code Injection - Denial of Services
Date: 2025-02
Affected: go/github.com/plentico/plenti
Attack vector: rce
Category: vulnerability-disclosure
Severity: Medium
CVE: CVE-2025-26260
CWE: CWE-94
CVSS: 6.5 (CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H)

### Summary While pushing a file via postLocal method if user add javascript code in file parameter that codes can exe in v8go context. ### Details While posting a file via postLocal, any attacker will add javascript codes to file parameter. That parameter content pass to componentSignature method after some validation. After that componentSignature parameter concat with ssrStr parameter. <img width="1145" alt="image" src="https://github.com/user-attachments/assets/a08a3fe5-2fbd-4a05-b93c-2ad127e6ee81" /> Last part of compileSvelte function ssrStr parameter executed in v8go engine. <img width="754" alt="image" src="https://github.com/user-attachments/assets/4e622761-3324-48d6-8264-6dd6e09055af" /> This cause to any one who can post a file also can push javascript code and run it. Thanks to v8go we can't use all javascript metod, if there is no any vulnerability in v8go we can't escape sandbox and can't run dangerous command like opening socket etc. But we can create infinite loop and the plenti can't response any request. After posting a file with name 'layouts/global/test; eval(`while(1);`);var test.svelte' we can see the ssrStr parameter include our javascript codes. <img width="1023" alt="image" src="https://github.com/user-attachments/assets/369c7820-ff8a-4b9a-9cd3-6b0692f1dcf3" /> **Note**: Eval usage not must I just want to ensure that it's run javascript commands. ### PoC **Request** ``` POST /postlocal HTTP/1.1 Host: localhost:3000 Content-Length: 125 Content


Mitigations:

Architectural layers (MAESTRO):