{"id":"CVE-2023-38695","aliases":["CVE-2023-38695","GHSA-vxjg-hchx-cc4g"],"related":[],"kind":"vulnerability","state":"published","title":"cypress-image-snapshot vulnerable to insecure snapshot file names","summary":"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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"### Impact\nIt'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:\n\n```js\n  cy.get('h1').matchImageSnapshot('../../../ignore-relative-dirs')\n```\nThe above will create an `ignore-relative-dirs.png` three levels up\n\n### Patches\nFixed in `8.0.2`\n\n### Workarounds\nValidate all the existing uses of `matchImageSnapshot` to ensure correct use of the filename argument. Example:\n\n```js\n    // snapshot name will be the test title\n    cy.matchImageSnapshot();\n\n    // snapshot name will be the name passed in\n    cy.matchImageSnapshot('login');\n```\n\n### References\nhttps://github.com/simonsmith/cypress-image-snapshot/issues/15","format":"markdown","source":"ghsa"},{"lang":"es","text":"cypress-image-snapshot muestra regresiones visuales en Cypress con jest-image-snapshot. Antes de la versión 8.0.2, era posible que un usuario pasara una ruta de archivo relativa para el nombre de la instantánea y llegara fuera del directorio del proyecto a la máquina que ejecutaba la prueba. Este problema se ha corregido en la versión 8.0.2.","source":"nvd"}],"published":"2023-08-01T16:59:40.000Z","modified":"2026-09-10T03:49:57.712Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N","score":6.5,"rating":"MEDIUM"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"<= 8.0.1","status":"affected"}],"vendor":"simonsmith","product":"cypress-image-snapshot","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"8.0.2"}],"ecosystem":"npm","package":"@simonsmith/cypress-image-snapshot","purl":"pkg:npm/%40simonsmith/cypress-image-snapshot","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"8.0.2"}],"vendor":"simonsmith","product":"cypress_image_snapshot","cpe":"cpe:2.3:a:simonsmith:cypress_image_snapshot:*:*:*:*:*:node.js:*:*","source":"nvd"}],"references":[{"url":"https://github.com/simonsmith/cypress-image-snapshot/security/advisories/GHSA-vxjg-hchx-cc4g","tags":["exploit","mitigation","vendor-advisory","web","x-refsource-confirm","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/simonsmith/cypress-image-snapshot/issues/15","tags":["exploit","issue-tracking","patch","third-party-advisory","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/simonsmith/cypress-image-snapshot/commit/ef49519795daf5183f4fac6f3136e194f20f39f4","tags":["patch","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/simonsmith/cypress-image-snapshot/releases/tag/8.0.2","tags":["release-notes","web","x-refsource-misc","x-transferred"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-38695","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/simonsmith/cypress-image-snapshot","tags":["package"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-10-04T19:39:39.519Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-38695","url":"https://www.cve.org/CVERecord?id=CVE-2023-38695","licence":"CVE Terms of Use","modified":"2024-10-04T19:39:48.430Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vxjg-hchx-cc4g","url":"https://github.com/advisories/GHSA-vxjg-hchx-cc4g","licence":"CC-BY-4.0","modified":"2026-09-10T03:49:57.712Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-38695","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-38695","licence":"Public domain","modified":"2026-06-17T06:10:58.303Z"}],"updatedAt":"2026-11-25T22:58:26.768Z","epss":{"score":0.00989,"percentile":0.63474,"date":"2026-12-01T12:00:22.000Z"}}