fix(security): upgrade postgresql-jdbc to 42.7.11 to remediate CVE-2026-42198#41812
fix(security): upgrade postgresql-jdbc to 42.7.11 to remediate CVE-2026-42198#41812subrata71 wants to merge 2 commits into
Conversation
…26-42198 CVE-2026-42198 (CVSS 7.5, HIGH) is a client-side denial-of-service in the PostgreSQL JDBC driver's SCRAM-SHA-256 handshake (affects 42.2.0 through 42.7.10). A malicious or compromised PostgreSQL server can respond with an arbitrarily large PBKDF2 iteration count, causing the client to burn CPU inside PBKDF2 with no effective cap. loginTimeout does not mitigate the issue. In the postgres plugin this is reachable by any authenticated user with datasource-creation rights, who can point a datasource at a hostile server and wedge Appsmith server CPU / Hikari pool. Bump the pinned org.postgresql:postgresql override in postgresPlugin from 42.6.1 to 42.7.11, which introduces scramMaxIterations (default 100,000) to cap iterations before the PBKDF2 computation runs. Refresh the override comment to reflect the current Spring Boot version (3.5.12, which manages 42.7.10) and the new floor for removing the override. Behavior change to coordinate in release notes ---------------------------------------------- pgjdbc 42.7.9 (PR pgjdbc#3866) rewrote PGInterval.getValue() for ~32x throughput and as a side effect now omits zero-valued components from the string representation. The postgres plugin emits this exact string for INTERVAL columns (PostgresPlugin.java, INTERVAL_TYPE_NAME branch: resultSet.getObject(i).toString()). User-visible diff: before: \"1 years 5 mons 0 days 2 hours 0 mins 0.0 secs\" after: \"1 years 5 mons 2 hours\" Apps that regex / equality-check INTERVAL strings (rather than parsing them with a library) will need to adapt. The four PostgresPluginTest assertions that pinned the legacy shape are updated to the new shape. Verification ------------ mvn -pl appsmith-plugins/postgresPlugin test Tests run: 66, Failures: 0, Errors: 0, Skipped: 0 (testcontainers PG) mvn -pl appsmith-plugins/postgresPlugin dependency:tree org.postgresql:postgresql:jar:42.7.11:compile Note: committed with --no-verify because the husky pre-commit hook duplicates staged files at wrong paths under sibling worktrees. Spotless formatting was applied manually before commit via mvn spotless:apply on app/server/appsmith-plugins/postgresPlugin. Will be revisited separately.
WalkthroughPostgreSQL JDBC driver bumped to 42.7.11 in the Postgres plugin POM; server unit tests and Cypress E2E tests updated to expect the driver’s new compact interval string formatting. ChangesPostgreSQL Driver Upgrade
🎯 2 (Simple) | ⏱️ ~10 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
/build-deploy-preview skip-tests=true |
|
Deploying Your Preview: https://github.com/appsmithorg/appsmith/actions/runs/25850461096. |
|
Deploy-Preview-URL: https://ce-41812.dp.appsmith.com |
…ompact format CE PR CI surfaced 5 failures in DateTime_Spec.ts after the pgjdbc bump. Same root cause as the unit-test updates: pgjdbc 42.7.9 (PR pgjdbc#3866) changed PGInterval.getValue() to (a) omit zero-valued components and (b) drop the trailing .0 from integer whole seconds. The Cypress assertions hardcoded the legacy 6-field format, so each one needs to be rewritten. Mapping the 7 hardcoded strings: "0 years 11 mons 29 days 23 hours 0 mins 0.0 secs" -> "11 mons 29 days 23 hours" "0 years 1 mons 0 days 0 hours 0 mins 0.0 secs" -> "1 mons" "0 years 0 mons 1 days 0 hours 0 mins 0.0 secs" -> "1 days" "6 years 5 mons 4 days 3 hours 2 mins 1.0 secs" -> "6 years 5 mons 4 days 3 hours 2 mins 1 secs" "0 years 0 mons 3 days 4 hours 5 mins 6.0 secs" -> "3 days 4 hours 5 mins 6 secs" "1 years 3 mons 2 days 6 hours 4 mins 5.0 secs" -> "1 years 3 mons 2 days 6 hours 4 mins 5 secs" "1 years 2 mons 0 days 0 hours 0 mins 0.0 secs" -> "1 years 2 mons" Each expected value matches what CI observed as the actual response. Prettier collapsed the now-shorter assertions to single lines. Committed with --no-verify due to the same husky path-resolution issue under worktrees as the previous commit on this branch.
Linear: APP-15219
Summary
42.2.0 ≤ v < 42.7.11. A malicious or compromised PostgreSQL server can respond with an arbitrarily large PBKDF2 iteration count, causing the JDBC client to burn an entire CPU core inside PBKDF2 with no effective cap.loginTimeoutdoes not mitigate the issue.postgresPluginand is used to connect to every Appsmith user's Postgres datasource. Any authenticated user with datasource-creation rights can point a datasource at a hostile PG server and wedge Appsmith server CPU / Hikari pool — so blast radius is broader than typical infra-side CVEs.org.postgresql:postgresqloverride inpostgresPluginfrom42.6.1→42.7.11, which introduces the newscramMaxIterationsconnection property (default100_000) that caps iterations before the PBKDF2 computation runs.The previous comment on this override (
Remove once spring-boot is at least at 3.1.9 or 3.2.3) was already stale — we're on Spring Boot 3.5.12, whose BOM managesorg.postgresql:postgresqlto 42.7.10, which is also in the vulnerable range. The override is refreshed to reflect the new floor for removal (Spring Boot managing ≥ 42.7.11).pgjdbc 42.7.9(pgjdbc#3866) rewrotePGInterval.getValue()for ~32× throughput. As a side effect, the string representation now omits zero-valued components. The postgres plugin emits this exact string forINTERVALcolumns (PostgresPlugin.java,INTERVAL_TYPE_NAMEbranch:resultSet.getObject(i).toString()), so user-visible query results change shape:1 year 5 months 2 hours1 years 5 mons 0 days 2 hours 0 mins 0.0 secs1 years 5 mons 2 hours0 seconds0 years 0 mons 0 days 0 hours 0 mins 0.0 secs0.0 secsImpact for users: Any Appsmith app that regexes / equality-checks the string representation of an
INTERVALcolumn will need to adapt. Apps that just display the value in a widget will show a more compact label.Action for release notes: explicit "Breaking change" callout under the postgres plugin, including the before/after example, so customers can audit their queries before upgrading.
The 4
PostgresPluginTestassertions that pinned the legacy 6-field shape are updated to match.Test plan
mvn -pl appsmith-plugins/postgresPlugin -am compile— cleanmvn -pl appsmith-plugins/postgresPlugin -am test-compile— cleanmvn -pl appsmith-plugins/postgresPlugin test(testcontainers PG) — 66 tests, 0 failuresmvn -pl appsmith-plugins/postgresPlugin dependency:treeconfirmsorg.postgresql:postgresql:jar:42.7.11:compileSELECT now() - '...'::interval AS dstyle queries, confirm result shape is the new compact form and the connection still completes successfullyReferences
Summary by CodeRabbit
Chores
Bug Fixes
Tests
Automation
/ok-to-test tags="@tag.All"
Tip
🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/25859949356
Commit: a9b1412
Cypress dashboard.
Tags:
@tag.AllSpec:
Thu, 14 May 2026 13:52:44 UTC