Repository navigation
Conversation
…aper options internalAllowedFileRoots opts paths out of scraper.security.fileAccess and is meant only for the scraper's own temp-archive handoff. The tRPC API accepts scraper options without validation, so a caller could set it. Strip it in normalizeScraperOptions, which every enqueue and every replay of stored options passes through. Adds two regression tests. Fixes arabold#651 Credit: Ugur Celik (ucsurf), @ucsurf — Ugur Celik (ucsurf) · https://uc.surf We find and report security issues in open source before attackers do. If our work helped you, a small contribution keeps it going and makes the internet a little safer for everyone: https://buymeacoffee.com/ucsurf
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hardening for the scraper option path reported in #651, from a review of
mainat 47fd9b7 (v3.5.0, 2026-12-05).internalAllowedFileRootsis an internal-only bypass ofscraper.security.fileAccess.enqueueScrapeJobcurrently acceptsoptionswith no validation, so a caller who can already reach the unauthenticated/api(for example a LAN or Docker peer; the default bind is still loopback) can set the key and defeat the configured file-access policy. The key is also stored and replayed on refresh.This change drops
internalAllowedFileRootsinnormalizeScraperOptions, which every enqueue and every replay of stored options passes through, and logs a warning. The web scraper's own temp-archive handoff sets the key after normalization on its own copy, so it is unaffected. Two regression tests are included. Afix.patchis available on request.Fixes #651
Credit: Ugur Celik (ucsurf), @ucsurf
— Ugur Celik (ucsurf) · https://uc.surf
We find and report security issues in open source before attackers do. If our work helped you, a small contribution keeps it going and makes the internet a little safer for everyone:
https://buymeacoffee.com/ucsurf