Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
📦 npm
Not in CISA KEV

GHSA-322x-v876-g883 — @asymmetric-effort/noggin…

Fix: asymmetric-effort/NogginLessDom@785e6ac

GHSA-322x-v876-g883 is a security vulnerability in @asymmetric-effort/nogginlessdom. A fix is available for @asymmetric-effort/nogginlessdom — see the affected versions and patch details below.

@asymmetric-effort/nogginlessdom's Path Traversal in matchFileSnapshot allows arbitrary file write

Published
Jul 2, 2026
Updated
Sep 10, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Sep 10, 2026 · OSV.dev, FIRST.org (EPSS)

Real-World Exposure

1 pkg affected

How broadly this vulnerability is actually deployed: weekly install volume shows current usage, and reverse-dependency count shows how many other packages break if it stays unpatched.

0other npm packages depend on this — each one inherits the vulnerability until it's patched upstream
@asymmetric-effort/nogginlessdomnpm
189downloads / week

Description

Summary

The matchFileSnapshot function in src/assertions/snapshots.ts accepted a filePath parameter with zero validation. When snapshot update mode was active (UPDATE_SNAPSHOTS=1 or setUpdateMode('all')), an attacker who controls test input could write arbitrary content to any filesystem path the process has write access to, including creating intermediate directories.

Affected Code

File: src/assertions/snapshots.ts, lines 732-769

export function matchFileSnapshot(actual: unknown, filePath: string): void {
  const serialized = serialize(actual);
  const mode = resolveUpdateMode();
  const fileExists = fs.existsSync(filePath);

  if (!fileExists) {
    if (mode === 'all' || mode === 'new') {
      const dir = path.dirname(filePath);
      if (!fs.existsSync(dir)) {
        fs.mkdirSync(dir, { recursive: true });
      }
      fs.writeFileSync(filePath, serialized, 'utf-8');

The filePath flows from expect(value).toMatchFileSnapshot(filePath) at index.ts:1033-1035 with no sanitization, no check that the path is within an expected directory, and no symlink resolution.

Proof of Concept

import { expect, setUpdateMode } from '@asymmetric-effort/nogginlessdom';

setUpdateMode('all');

// Writes arbitrary content to any writable path
expect('malicious content').toMatchFileSnapshot('/tmp/exploit/payload.txt');

// Path traversal via relative components
expect('data').toMatchFileSnapshot('../../../tmp/evil.txt');

// In CI environments, could overwrite CI config
expect('injected step').toMatchFileSnapshot('/home/runner/.github/workflows/backdoor.yml');

Impact

In CI/CD environments where test files may come from untrusted pull requests, this allows writing to any writable filesystem location with directory creation. An attacker could overwrite configuration files, inject code into build artifacts, or modify CI pipeline definitions.

Fix

Fixed in commit https://github.com/asymmetric-effort/NogginLessDom/commit/785e6ac6e124d1a89b3ccf40bbd75fc8e4cb215d on main. The matchFileSnapshot function now validates that the resolved file path is within the project root directory (defaults to process.cwd(), configurable via optional projectRoot parameter). Paths that resolve outside the project directory are rejected with a descriptive error.

export function matchFileSnapshot(
  actual: unknown,
  filePath: string,
  projectRoot?: string,
): void {
  const root = projectRoot ?? process.cwd();
  const resolved = path.resolve(root, filePath);
  if (!resolved.startsWith(root + path.sep) && resolved !== root) {
    throw new Error(
      `File snapshot path must be within the project directory: ${filePath}`,
    );
  }
  // ... all subsequent file I/O uses `resolved` instead of `filePath`
}

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
📦npm@asymmetric-effort/nogginlessdomall versions0.0.22npm install @asymmetric-effort/nogginlessdom@0.0.22

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for @asymmetric-effort/nogginlessdom, including transitive dependencies — a direct dependency you never call can still pull in a vulnerable version.

  2. Fix

    Update @asymmetric-effort/nogginlessdom to 0.0.22 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-322x-v876-g883 is resolved across your whole dependency graph.

  3. Workarounds

    Resolve every user-supplied path to its canonical form and reject anything that escapes the intended directory, and run the component under an account that has no read or write access outside the directory it legitimately serves.

Frequently Asked Questions

## Summary The `matchFileSnapshot` function in `src/assertions/snapshots.ts` accepted a `filePath` parameter with zero validation. When snapshot update mode was active (`UPDATE_SNAPSHOTS=1` or `setUpdateMode('all')`), an attacker who controls test input could write arbitrary content to any filesystem path the process has write access to, including creating intermediate directories. ## Affected Code **File:** `src/assertions/snapshots.ts`, lines 732-769 ```typescript export function matchFileSnapshot(actual: unknown, filePath: string): void { const serialized = serialize(actual); const
O3 Security · Impact-Aware SCA

Is GHSA-322x-v876-g883 in your dependencies?

Find it across npm, including transitive dependencies.

GHSA-322x-v876-g883: @asymmetric | O3 Security