Skip to content

SQL injection: the keyword heuristic is bypassed with whitespace/newlines; triple-brace values are still interpolated; number/boolean validators unimplemented #192

Closed

Description

@jrosskopf

From the crew review (request pipeline). Reproduced: with WHERE n = '{{{params.name}}}' and a string validator, name=x'\n\nOR 2>1\n\nOR n = 'x returns all rows (src/request_validator.cpp heuristic). Triple-brace sites are not bound by the prepared rewriter (src/prepared_template_rewriter.cpp ~149). number/float/double/boolean are classified bindable but validateField has no type checks, which also skips the injection screen (src/request_validator.cpp ~94). Also: parameter extraction ignores field-in (a header field can be satisfied from the query string), request-supplied cacheTable/cacheSchema/cacheCatalog can override cache metadata (src/cache_manager.cpp ~963).
Direction: bind values at every value position (including quoted triple-brace strings), implement strict validators for every classified type, honour field-in, make cache metadata server-owned. Needs a compatibility review of the documented triple-brace pattern.

Activity

  1. added 2 commits that reference this issue on Oct 4, 2026
  2. jrosskopf commented on Nov 21, 2026

    @jrosskopf
    ContributorAuthor

    Fixed and merged in #230 (real-binary integration tests under test/integration/).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions