GHSA-vxjg-hchx-cc4g

    Dashboard / Vulnerabilities / GHSA-vxjg-hchx-cc4g

    GHSA-vxjg-hchx-cc4g

    Published: 1 Aug 2023Last Modified: 10 Sept 2026

    Summary: @simonsmith/cypress-image-snapshothas fix for insecure snapshot file names

    Details: ### 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: ```js 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: ```js // 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

    Affected packages

    Package

    Name: @simonsmith/cypress-image-snapshot

    Purl: pkg:npm/%40simonsmith/cypress-image-snapshot

    Affected ranges

    Type: SEMVER

    Events:

    Introduced- 0
    Fixed -8.0.2

    Affected versions

    Common Vulnerability Scoring System

    Attack Vector
    Network
    Adjacent
    Local
    Physical
    Privileges Required
    None
    Low
    High
    User Interaction
    None
    Required
    Scope
    Unchanged
    Changed
    Confidentiality
    None
    Low
    High
    Integrity
    None
    Low
    High
    Availability
    None
    Low
    High
    GHSA-vxjg-hchx-cc4g | CVE-DB