Vulnerability · Published Aug 4, 2023 · Assigned by GitHub_M
CVE-2023-38695cypress-image-snapshot vulnerable to insecure snapshot file names
Medium 6.5
In plain English
A medium-severity path traversal in cypress-image-snapshot from simonsmith. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.0% (higher than 63% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
cypress-image-snapshot shows visual regressions in Cypress with jest-image-snapshot. Prior to version 8.0.2, 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. This issue has been patched in version 8.0.2.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| npm | @simonsmith/cypress-image-snapshot | 8.0.2 | GHSA-vxjg-hchx-cc4g |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| simonsmith | cypress-image-snapshot | <= 8.0.1 |
Weakness: CWE-22 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
References
- https://github.com/simonsmith/cypress-image-snapshot/security/advisories/GHSA-vxjg-hchx-cc4g x_refsource_CONFIRM
- https://github.com/simonsmith/cypress-image-snapshot/issues/15 x_refsource_MISC
- https://github.com/simonsmith/cypress-image-snapshot/commit/ef49519795daf5183f4fac6f3136e194f20f39f4 x_refsource_MISC
- https://github.com/simonsmith/cypress-image-snapshot/releases/tag/8.0.2 x_refsource_MISC