Skip to content

postgres-protocol: raise SCRAM iteration limit to two million - #35

Merged
bosconi merged 4 commits into
MaterializeInc:masterfrom
bosconi:jc/scram-iteration-limit-2m
Sep 23, 2026
Merged

bosconi merged 4 commits into
MaterializeInc:masterfrom
bosconi:jc/scram-iteration-limit-2m

Conversation

@bosconi

@bosconi bosconi commented Sep 23, 2026 •

Copy link
Copy Markdown
Member

Raise the SCRAM iteration limit to 2,000,000 with boundary tests. Fix Wasm feature wiring, the CI toolchain, and Clippy warnings after the protocol upgrade.

@bosconi
bosconi merged commit fcca71c into MaterializeInc:master Sep 23, 2026
4 checks passed
bosconi added a commit to MaterializeInc/materialize that referenced this pull request Sep 24, 2026
### Motivation

Address
[GHSA-5x78-73v4-xg6w](GHSA-5x78-73v4-xg6w),
which allows a malicious PostgreSQL server to exhaust client CPU by
supplying an unbounded SCRAM iteration count during authentication.

### Description

Raise the workspace minimum for `postgres-protocol` from 0.6.9 to 0.6.12
and update the locked Materialize rust-postgres fork revision. The fork
update imports the upstream protocol release, including the
2,000,000-iteration cap, while retaining the replication protocol
extensions. Other fork crate versions remain unchanged. Unrelated
dependency versions and resolution changes are excluded.

Uses merged
[rust-postgres#35](MaterializeInc/rust-postgres#35)
at `fcca71c8`, with a 2,000,000-iteration SCRAM cap.

### Verification

The dependency update includes upstream regression coverage for
excessive SCRAM iterations, normal SCRAM authentication, and invalid
hstore lengths. The fork's replication extension is unchanged from its
previous implementation.

### Release notes

* Prevent malicious PostgreSQL servers from causing excessive CPU
consumption during SCRAM authentication by rejecting iteration counts
above 2,000,000.
jdonelson pushed a commit to MaterializeInc/materialize that referenced this pull request Sep 24, 2026
### Motivation

Address
[GHSA-5x78-73v4-xg6w](GHSA-5x78-73v4-xg6w),
which allows a malicious PostgreSQL server to exhaust client CPU by
supplying an unbounded SCRAM iteration count during authentication.

### Description

Raise the workspace minimum for `postgres-protocol` from 0.6.9 to 0.6.12
and update the locked Materialize rust-postgres fork revision. The fork
update imports the upstream protocol release, including the
2,000,000-iteration cap, while retaining the replication protocol
extensions. Other fork crate versions remain unchanged. Unrelated
dependency versions and resolution changes are excluded.

Uses merged
[rust-postgres#35](MaterializeInc/rust-postgres#35)
at `fcca71c8`, with a 2,000,000-iteration SCRAM cap.

### Verification

The dependency update includes upstream regression coverage for
excessive SCRAM iterations, normal SCRAM authentication, and invalid
hstore lengths. The fork's replication extension is unchanged from its
previous implementation.

### Release notes

* Prevent malicious PostgreSQL servers from causing excessive CPU
consumption during SCRAM authentication by rejecting iteration counts
above 2,000,000.
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.

3 participants