Nixpkgs security tracker

Login with GitHub

Suggestion detail

Dismissed
updated 4 months ago by @LeSuisse Activity log
  • Created suggestion
  • @LeSuisse ignored
    38 packages
    • manual
    • metrics
    • tarball
    • unstable
    • lib-tests
    • nixpkgs-fmt
    • nixpkgs-vet
    • nixpkgs-lint
    • darwin-tested
    • dhall-nixpkgs
    • nixpkgs-track
    • nixpkgs-manual
    • nixpkgs-review
    • release-checks
    • nixpkgs-pytools
    • nixpkgs-hammering
    • nixpkgs-reviewFull
    • nixpkgs-lint-community
    • nixpkgs-openjdk-updater
    • python312Packages.nixpkgs
    • python313Packages.nixpkgs
    • haskellPackages.dhall-nixpkgs
    • lixPackageSets.git.nixpkgs-review
    • python312Packages.nixpkgs-pytools
    • python313Packages.nixpkgs-pytools
    • tests.trivial-builders.references
    • haskellPackages.distribution-nixpkgs
    • lixPackageSets.stable.nixpkgs-review
    • lixPackageSets.lix_2_90.nixpkgs-review
    • lixPackageSets.lix_2_92.nixpkgs-review
    • lixPackageSets.lix_2_93.nixpkgs-review
    • lixPackageSets.lix_2_94.nixpkgs-review
    • python312Packages.nixpkgs-plugin-update
    • python313Packages.nixpkgs-plugin-update
    • python312Packages.nixpkgs-updaters-library
    • python313Packages.nixpkgs-updaters-library
    • vscode-extensions.b4dm4n.vscode-nixpkgs-fmt
    • haskellPackages.distribution-nixpkgs-unstable
  • @LeSuisse dismissed
Tandoor Recipes module allows SQLite database to be externally accessible with the default settings

Tandoor Recipes is a recipe manager than can be installed with the Nix package manager. Starting in version 23.05 and prior to version 26.05, when using the default configuration of Tandoor Recipes, specifically using SQLite and default `MEDIA_ROOT`, the full database file may be externally accessible, potentially on the Internet. The root cause is that the NixOS module configures the working directory of Tandoor Recipes, as well as the value of `MEDIA_ROOT`, to be `/var/lib/tandoor-recipes`. This causes Tandoor Recipes to create its `db.sqlite3` database file in the same directory as `MEDIA_ROOT` causing it to be accessible without authentication through HTTP like any other media file. This is the case when using `GUNICORN_MEDIA=1` or when using a web server like nginx to serve media files. NixOS 26.05 changes the default value of `MEDIA_ROOT` to a sub folder of the data directory. This only applies to configurations with `system.stateVersion` >= 26.05. For older configurations, one of the workarounds should be applied instead. NixOS 25.11 has received a backport of this patch, though it doesn't fix this vulnerability without user intervention. A recommended workaround is to move `MEDIA_ROOT` into a subdirectory. Non-recommended workarounds include switching to PostgreSQL or disallowing access to `db.sqlite3`.

Affected products

nixpkgs
  • ==>= 23.05, < 26.05
Ignored packages (38)

pkgs.manual

None

  • nixos-unstable -
    • nixpkgs-unstable
    • nixos-unstable-small

pkgs.metrics

None

  • nixos-unstable -
    • nixpkgs-unstable
    • nixos-unstable-small

pkgs.lib-tests

None

  • nixos-unstable -
    • nixpkgs-unstable
    • nixos-unstable-small

pkgs.nixpkgs-vet

Tool to vet (check) Nixpkgs, including its pkgs/by-name directory

pkgs.nixpkgs-lint

A utility for Nixpkgs contributors to check Nixpkgs for common errors

  • nixos-unstable 1
    • nixpkgs-unstable 1
    • nixos-unstable-small 1

pkgs.nixpkgs-manual

None

  • nixos-unstable -
    • nixpkgs-unstable
    • nixos-unstable-small

pkgs.nixpkgs-review

Review pull-requests on https://github.com/NixOS/nixpkgs

pkgs.release-checks

None

  • nixos-unstable -
    • nixpkgs-unstable
    • nixos-unstable-small

pkgs.nixpkgs-pytools

Tools for removing the tedious nature of creating nixpkgs derivations

Issue impacted the NixOS module, not the software itself

https://github.com/NixOS/nixpkgs/security/advisories/GHSA-g8w3-p77x-mmxh