@simonsmith/cypress-image-snapshothas fix for insecure snapshot file names
Impact
It's possible for a user to pass a relative file path for the snapshot name and reach outside of the project directory into the machine running the test. Example:
cy.get('h1').matchImageSnapshot('../../../ignore-relative-dirs')
The above will create an ignore-relative-dirs.png three levels up
Patches
Fixed in 8.0.2
Workarounds
Validate all the existing uses of matchImageSnapshot to ensure correct use of the filename argument. Example:
// snapshot name will be the test title
cy.matchImageSnapshot();
// snapshot name will be the name passed in
cy.matchImageSnapshot('login');
References
https://github.com/simonsmith/cypress-image-snapshot/issues/15
Software afectado
Haz clic en una tecnología para ver todas sus vulnerabilidades.
| Plataforma | Paquete | Versiones vulnerables | Corregida en |
|---|---|---|---|
| Paquete de npm | @simonsmith/cypress-image-snapshot | < 8.0.2 | 8.0.2 |
Referencias
- https://github.com/simonsmith/cypress-image-snapshot/security/advisories/GHSA-vxjg-hchx-cc4g
- https://nvd.nist.gov/vuln/detail/CVE-2023-38695
- https://github.com/simonsmith/cypress-image-snapshot/issues/15
- https://github.com/simonsmith/cypress-image-snapshot/commit/ef49519795daf5183f4fac6f3136e194f20f39f4
- https://github.com/simonsmith/cypress-image-snapshot
- https://github.com/simonsmith/cypress-image-snapshot/releases/tag/8.0.2
- Vector CVSS
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N- Debilidad (CWE)
CWE-22- Plataforma
- npm
- Paquete
@simonsmith/cypress-image-snapshot- Publicada
- 01.08.2023
- Actualizado
- 11.10.2026 10:22
Fuentes y licencias
OSV / GitHub Advisory Database - GHSA-vxjg-hchx-cc4g - CC BY 4.0
Historial de vulnerabilidades: @simonsmith/cypress-image-snapshot
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.
Esta es la única vulnerabilidad conocida de este paquete.
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.