1. Archivio CVE
  2. 2026
  3. CVE-2026-57149

CVE-2026-57149

9.9 Gravità critica CVSS v3.1 · fonte NVD CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H 9.9 – Critica

Descrizione

plone.app.portlets.portlets provides a Plone-specific user interface for plone.portlets, as well as a standard set of portlets that ship with Plone. Starting in version 5.0.0 and prior to versions 5.0.8, 6.0.4, and 7.0.2, the Classic portlet (plone.app.portlets.portlets.classic) used its user-supplied template/macro fields to build a TALES path expression that was then evaluated by the TAL path() helper. Because the value was interpreted as a full TALES expression, a user able to add or edit a Classic portlet could supply a crafted value that escapes simple path traversal and is evaluated as arbitrary code. This is exploitable by any authenticated user who can configure a Classic portlet - which, with the default role map, includes regular users on their personal dashboard. The result is code execution in the context of the Plone process, i.e. a privilege escalation across the trust boundary between an authenticated web user and the server-side process. The problem has been patched in `plone.app.portlets` 5.0.8, 6.0.4, and 7.0.2. Some workarounds are available. Restrict who can manage portlets: remove the `plone.app.portlets.ManageOwnPortlets` permission from untrusted roles, and limit Manage portlets to trusted administrators (usually this is already restricted to the Manager and Site Administrator roles). Where the Classic portlet is not needed, unregister it so it cannot be added. This would need to be done by editing a `portlets.xml` in your own code. One may also effectively disable showing the classic portlet by customising its template. In the Zope Management Interface go to the `portal_view_customizations` tool, locate the `classic.pt` template and click it. Click the Customize button. Remove all text and replace it with `<div>The classic portlet was disabled.</div>`. (This is not a recommended way of customizing a template, but in this case it is quite effective.)

Prodotti coinvolti

FornitoreProdottoVersionePiattaforma
plone plone.app.portlets >= 7.0.0, < 7.0.2 –
plone plone.app.portlets >= 6.0.0, < 6.0.4 –
plone plone.app.portlets >= 5.0.0, < 5.0.8 –

Tipo di vulnerabilità

CWE-95 Improper Neutralization of Directives in Dynamically Evaluated Code

The product receives input from an upstream component, but it does not neutralize or incorrectly neutralizes code syntax before using the input in a dynamic evaluation call (e.g. eval).

Impatto sui sistemi

AmbitoImpatto
Riservatezza Leggere file o cartelle, Leggere i dati dell’applicazione
Controllo degli accessi Aggirare i meccanismi di protezione
In alcuni casi il codice iniettabile controlla l’autenticazione, il che può tradursi in una vulnerabilità sfruttabile da remoto.
Controllo degli accessi Ottenere privilegi o assumere un’altra identità
Il codice iniettato può accedere a risorse a cui l’attaccante non potrebbe accedere direttamente.
Integrità, Riservatezza, Disponibilità, Altro Eseguire codice o comandi non autorizzati
Non ripudio Nascondere le proprie attività
Spesso le azioni compiute dal codice iniettato non lasciano traccia nei log.

Come si previene

Architettura e progettazione · Sviluppo · Refactoring If possible, refactor your code so that it does not need to use eval() at all.
Sviluppo · Validazione dell’input Considera ogni input come potenzialmente malevolo. Adotta una validazione per «elenco di valori ammessi»: accetta solo gli input che rispettano rigorosamente le specifiche e rifiuta, o trasforma in qualcosa di conforme, tutto il resto. Nel validare considera tutte le proprietà rilevanti: lunghezza, tipo, intervallo dei valori ammessi, input mancanti o in più, sintassi, coerenza tra campi collegati e rispetto delle regole di business (per esempio «barca» è sintatticamente valido perché contiene solo lettere, ma non lo è se il campo deve contenere solo colori come rosso o blu). Non limitarti a cercare input malevoli o malformati: quasi certamente ne sfuggirà qualcuno, soprattutto se l’ambiente del codice cambia, lasciando all’attaccante lo spazio per aggirare la validazione. Le liste di valori vietati restano utili per rilevare possibili attacchi o scartare subito gli input più malformati.
Sviluppo Inputs should be decoded and canonicalized to the application's current internal representation before being validated (CWE-180, CWE-181). Make sure that your application does not inadvertently decode the same input twice (CWE-174). Such errors could be used to bypass allowlist schemes by introducing dangerous inputs after they have been checked. Use libraries such as the OWASP ESAPI Canonicalization control. Consider performing repeated canonicalization until your input does not change any more. This will avoid double-decoding and similar scenarios, but it might inadvertently modify inputs that are allowed to contain properly-encoded dangerous content.
Sviluppo Nei programmi Python si consiglia spesso di usare ast.literal_eval() al posto di eval, perché è pensata per non eseguire codice. Un attaccante può però comunque esaurire memoria o stack con strutture molto annidate, per questo la documentazione di Python ne sconsiglia l’uso su dati non attendibili.

Le indicazioni di mitigazione sono riportate nella lingua originale del catalogo CWE del MITRE.

Tutte le 146 CVE di tipo CWE-95, con andamento e prevenzione

Fonte: catalogo CWE del MITRE · cwe.mitre.org