Making all attributes on a content-type public without noticing it
Summary
Anyone (Strapi developers, users, plugins) can make every attribute of a Content-Type public without knowing it.
Details
When dealing with content-types inside a Strapi instance, we can extend those using the appropriate container:
strapi.container.get('content-types').extend(contentTypeUID, (contentType) => newContentType);
The vulnerability only affects the handling of content types by Strapi, not the actual content types themselves. Users can use plugins or modify their own content types without realizing that the privateAttributes getter is being removed, which can result in any attribute becoming public. This can lead to sensitive information being exposed or the entire system being taken control of by an attacker(having access to password hashes).
PoC
Extend any content type on runtime (like in the bootstrap functions) and do a copy of the content-type object.
strapi.container.get('content-types').extend(contentTypeUID, (contentType) => {
const newCT = { ... contentType, attributes: { ...contentType.attributes, newAttr: {} } };
return newCT;
});
This will have as effect to remove the getter and as we rely on it in sanitization, every attributes will be considered as public.
Impact
Everyone can be impacted. Depending on how people are using/extending content-types. If the users are mutating the content-type, they will not be affected.
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Paquete de npm | @strapi/database | < 4.10.8 | 4.10.8 |
| Paquete de npm | @strapi/strapi | < 4.10.8 | 4.10.8 |
| Paquete de npm | @strapi/utils | < 4.10.8 | 4.10.8 |
Referencias
- Vector CVSS
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:H/I:L/A:N- Debilidad (CWE)
CWE-200- Plataforma
- npm
- Paquete
@strapi/database, @strapi/strapi, @strapi/utils- Publicada
- 25.07.2023
- Actualizado
- 11.10.2026 10:22
Fuentes y licencias
OSV / GitHub Advisory Database - GHSA-chmr-rg2f-9jmf - CC BY 4.0
Historial de vulnerabilidades: @strapi/utils
Todas las vulnerabilidades publicadas de este paquete (Paquete de npm), de la más reciente a la más antigua. Muestra si es un fallo aislado o un paquete que hay que vigilar.
- Entradas en total
- 3
- Primera → última
- 07.2023 09.2023
- Sin corrección
- 0
- Explotada en ataques
- 0
Distribución por gravedad
- Alta 1
- Media 2
Divulgaciones por año
- 2023: 3
- 2024: 0
- 2025: 0
- 2026: 0
-
Making all attributes on a content-type public without noticing it esta entrada
Identifica las vulnerabilidades de tu aplicación
Con la integración de DockRay y el inventario de software activado, DockRay compara las versiones notificadas de los componentes con las vulnerabilidades conocidas y avisa de las coincidencias confirmadas. La cobertura depende de la tecnología compatible y de los avisos disponibles.