Skip to content

fix(proxy): remove internal ID headers from proxy responses - #4

Merged
dviejokfs merged 1 commit into
mainfrom
feat/remove-internal-id-response-headers
Feb 16, 2026
Merged

dviejokfs merged 1 commit into
mainfrom
feat/remove-internal-id-response-headers

Conversation

@dviejokfs

Copy link
Copy Markdown
Contributor

Summary

  • Remove X-Project-ID, X-Environment-ID, and X-Deployment-ID headers from proxy responses — these leaked sequential internal integer IDs to end users, enabling enumeration and exposing potential IDOR attack surface
  • Preserve X-Request-ID for request tracing — operators can correlate with server-side logs for full routing context
  • Update README to add transactional email + DKIM and MCP server features to the feature matrix

Security

The removed headers exposed internal database IDs (sequential integers) on every proxied response. This allowed external observers to:

  • Enumerate how many projects/environments/deployments exist
  • Track growth rate over time
  • Potentially use IDs for IDOR attacks against any endpoint that accepts these IDs

Remove X-Project-ID, X-Environment-ID, and X-Deployment-ID headers from
proxy responses. These headers leaked sequential internal integer IDs to
end users, enabling enumeration of projects/environments/deployments and
exposing potential IDOR attack surface.

X-Request-ID is preserved for request tracing. Operators can correlate
request IDs with server-side logs for full routing context.

Also update README to add transactional email and MCP server features.
@dviejokfs
dviejokfs merged commit 22811fa into main Feb 16, 2026
4 of 5 checks passed
@dviejokfs
dviejokfs deleted the feat/remove-internal-id-response-headers branch February 16, 2026 22:47
dviejokfs added a commit that referenced this pull request Jul 15, 2026
… WHERE clauses (#328)

* fix(query-postgres): block function calls in data-browser WHERE clauses

The data-browser WHERE-clause validator relied on a keyword denylist applied
after string literals are stripped (security review finding #4). Data-returning
functions such as query_to_xml/database_to_xml/table_to_xml take their SQL
payload as a string-literal argument, so the payload was stripped before the
denylist ran and the function names themselves were not denylisted. A clause
like:

    1=1 AND query_to_xml('select ... from users', true, false, '') IS NOT NULL

therefore passed validation and exfiltrated arbitrary tables.

Enumerating dangerous functions can never be complete, so add a structural rule
that rejects function-call syntax outright: any identifier immediately
preceding '(' is treated as a function call and rejected. Only grouping parens
and IN/AND/OR/NOT (...) are permitted. With subqueries, UNION, and function
calls all blocked, a WHERE clause can reference only the current table's columns
and constants, closing the cross-table exfiltration class.

Regression tests cover the XML-function bypass and arbitrary function calls, and
confirm legitimate grouping and IN-lists still validate.

* fix(query-postgres): close quoted function call bypasses

* fix(query-postgres): reject alternate subquery forms

* fix(query-postgres): parse SQL literals safely

* fix(query-postgres): handle high-bit dollar tags

* test(query-postgres): execute attacks against seeded table
dviejokfs added a commit that referenced this pull request Jul 26, 2026
…with (#442)

Closes 11 of the 14 open Dependabot alerts; the remaining 3 are
upstream-blocked and re-verified unreachable (documented in Cargo.toml).

Fixed:
- next 16.2.6 -> 16.2.11 in examples/nextjs/basic (alerts #175-#183, 9
  alerts: SSRF in Server Actions on custom servers, SSRF via rewrite
  destination hostname, middleware/proxy bypass with Turbopack + single
  locale, DoS in Server Actions, cache confusion on invalid-UTF-8 and
  on request bodies, unbounded Server Action payload on Edge, image
  optimization SVG DoS, and unauthenticated Server Function endpoint
  disclosure). Verified: tsc --noEmit clean and `next build` succeeds.
- setuptools 82.0.0 -> 83.0.0 in sdks/python/uv.lock (alert #174,
  MANIFEST.in sdist exclusion bypass via NFC/NFD collision on APFS/HFS+).
- serde_with 3.20.0 -> 3.21.0, pulling serde_with_macros 3.21.0 (alert
  #173, KeyValueMap serialize panic on empty sequence/map entries).
  Reached via cloudflare 0.14 -> temps-dns.

Not fixable, re-verified unreachable (triage refreshed in Cargo.toml):
- protobuf 2.28.0 (#4): pingora-core 0.8.1 declares prometheus = "0.13"
  with default features, and `protobuf` is a DEFAULT feature of
  prometheus 0.13 -- cargo features are additive, so it cannot be
  disabled without vendoring a pingora fork. No ProtobufEncoder /
  TextEncoder / protobuf:: / PrometheusServer reference exists under
  crates/, so the 2.x parser is never fed input.
- opentelemetry_sdk 0.30.0 (#151): pinned via the getsentry/relay git
  rev. The bug is in the W3C BaggagePropagator; no case-insensitive
  match for `baggage` exists under crates/.
- remove_dir_all 0.5.3 (#1): nixpacks 1.41.0 (still crates.io latest)
  uses deprecated tempdir, which hard-requires remove_dir_all ^0.5. The
  TOCTOU branch only runs when out_dir is None, and
  nixpacks_preset.rs:508 remains the only out_dir site, passing Some(..).
- serde_with 2.3.3 also remains via nixpacks and has no fix (2.3.3 is
  the last 2.x; the fix landed only in 3.21.0). KeyValueMap does exist
  in 2.3.3, but nixpacks uses serde_with with default-features = false,
  features = ["macros"], solely for skip_serializing_none.

Cargo.lock also re-unifies two entries that any re-resolve surfaces, both
within their declared ranges and not regressions: pingora-lru moves to
hashbrown 0.14.5 (its req is "0", and ahash/allocator-api2 are 0.14.5
defaults), and iana-time-zone moves to windows-core 0.57.0 (req is
">=0.56, <=0.62"; a cfg(target_os = "windows")-only dep, collapsing a
duplicate copy).

Verified: cargo check --lib --workspace clean (0 errors); cargo audit
vulnerability count unchanged at the 3 known upstream-blocked entries.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant