Skip to content

fix: harden php prototype pollution sinks#597

Merged
kvz merged 1 commit into
mainfrom
fix/php-prototype-pollution-cluster
Mar 25, 2026
Merged

fix: harden php prototype pollution sinks#597
kvz merged 1 commit into
mainfrom
fix/php-prototype-pollution-cluster

Conversation

@kvz

@kvz kvz commented Mar 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • harden php/var/unserialize against __proto__ / constructor / prototype key injection
  • harden php/strings/parse_str by skipping dangerous key paths at assignment time instead of relying on regex-prototype guards
  • add focused regression coverage for both sinks

Context

This is the code-level follow-up for the remaining prototype-pollution security triage cluster:

Validation

  • corepack yarn exec vitest run test/custom/parse_str-prototype-pollution.vitest.ts test/custom/unserialize-prototype-pollution.vitest.ts
  • corepack yarn exec vitest run test/generated/php/strings/parse_str.vitest.ts test/generated/php/var/unserialize.vitest.ts
  • direct tsx repro scripts for both parse_str and unserialize
  • git diff --check
  • corepack yarn check reached the usual silent tail after all visible subchecks were green

Notes

  • parse_str and unserialize are currently not in the executable parity target set, so test:parity reports them as unverified rather than runnable parity cases.
  • council-review was started and did not produce a concrete finding before entering its usual long multi-agent tail, so I did not block the PR on that tooling latency.

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