Skip to main content
Menu
Advisories

The fallow-cov coverage companion reads inputs outside the project root with no size limit

GHSA-JFH9-36Q7-42CWPublished Updated GitHub

Description

fallow health --runtime-coverage and the coverage commands hand coverage inputs to the companion program fallow-cov (npm @fallow-cli/fallow-cov). Up to 0.5.1, the companion resolved the script URLs of V8 coverage dumps with no check against the project root. Its source scan followed links out of the root. It read inputs with no file type check and no size limit. Some error messages named a path outside the root and the reason of the operating system.

Affected inputs

  • Script URLs in V8 coverage dumps.
  • The source scan of the project.
  • V8, Istanbul and V8 directory inputs.
  • require specifier probes.

Impact

A repository can commit coverage dumps or links that make the companion read files outside the project. The read content does not appear in the output. The error text can show whether an outside path exists. A link to a FIFO or a device can make the run wait, and a large input can use all memory.

Patches

Fixed in @fallow-cli/fallow-cov 0.5.2. The companion now resolves V8 script URLs inside the canonical project root. A URL outside the root, a remote URL or a missing source gives a warning and skips the script. The source scan follows no link out of the root and has limits for file size, file count and total bytes. Inputs must be regular files below a size limit. Error text does not name a path outside the root. The fallow CLI also passes to the companion only V8 scripts inside the root (github.com/fallow-rs/fallow/pull/5277).

Workarounds

Do not run --runtime-coverage with coverage dumps from an untrusted source. Generate the coverage dumps yourself in a clean checkout.

Credit

Reported by the Anthropic OSS Scanner team.

Affected versions

References

GitHub · fallow-rs/fallow