You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "bvolpato (via GitHub)" <gi...@apache.org> on 2026/03/24 22:27:41 UTC
[PR] [Security] Bump PostgreSQL JDBC Driver from 42.2.16 to 42.7.10 [beam]
bvolpato opened a new pull request, #37941:
URL: https://github.com/apache/beam/pull/37941
## Summary
Bumps the PostgreSQL JDBC Driver from `42.2.16` to `42.7.10` to address multiple security vulnerabilities.
**CVE Details:**
| CVE | CVSS | Description |
|-----|------|-------------|
| [CVE-2024-1597](https://www.cve.org/CVERecord?id=CVE-2024-1597) | **9.8 Critical** | SQL injection via `preferQueryMode=simple` in combination with application code that has a vulnerable SQL query. |
| [CVE-2022-31197](https://www.cve.org/CVERecord?id=CVE-2022-31197) | **7.1 High** | SQL injection in `ResultSet.refreshRow()` with column names containing a statement terminator. |
| [CVE-2022-21724](https://www.cve.org/CVERecord?id=CVE-2022-21724) | **9.8 Critical** | pgjdbc instantiates plugin instances based on class names provided via connection properties without verifying the class implements the expected interface, which can lead to code execution through arbitrary classes. |
**References:**
- https://jdbc.postgresql.org/security/
- https://www.postgresql.org/about/news/postgresql-jdbc-4272-4261-4255-4244-4239-42228-and-42228jre7-security-update-for-cve-2024-1597-2812/
## Changes
- Bumps `postgres_version` in `BeamModulePlugin.groovy` from `42.2.16` to `42.7.10`
- Adds Security Fixes entry in `CHANGES.md` for the 2.73.0 release
## Testing
The PostgreSQL JDBC Driver maintains JDBC 4.2 API backward compatibility across 42.x releases. The changes between 42.2.16 and 42.7.10 are primarily internal security and bug fixes — no public API changes.
The existing test suites that exercise this dependency serve as sufficient regression coverage:
- `:sdks:java:io:jdbc:test` — JdbcIO unit and integration tests via testcontainers with PostgreSQL
- `:sdks:java:io:common:test` — Common IO utilities
- `:sdks:java:io:hadoop-format:test` — HadoopFormatIO with PostgreSQL backend
No new tests are needed as the JDBC API surface is unchanged.
------------------------
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
- [x] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable.
- [x] Update `CHANGES.md` with noteworthy changes.
- [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://github.com/apache/beam/blob/master/CONTRIBUTING.md#make-the-reviewers-job-easier).
GitHub Actions Tests Status (on master branch)
------------------------------------------------------------------------------------------------
[](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
[](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Security] Bump PostgreSQL JDBC Driver from 42.2.16 to 42.7.10 [beam]
Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on PR #37941:
URL: https://github.com/apache/beam/pull/37941#issuecomment-4165275168
It seems to be an issue in postgres driver 42.7. When running the write pipeline or read pipeline in two different java programs, it works as before; but when run it in parallel (as the test did), DebeziumIO raises many warnings
```
cannot load schema for table 'inventory.customers'
Refresh of inventory.customers was requested but the table no longer exists
cannot load schema for table 'inventory.customers'
Refresh of inventory.customers was requested but the table no longer exists
...
```
(on every poll) and it only reads 4 rows that pre-existing in the container. It appears to be a conflict when a driver is used in writing and reading same table at same time.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Security] Bump PostgreSQL JDBC Driver from 42.2.16 to 42.7.10 [beam]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #37941:
URL: https://github.com/apache/beam/pull/37941#issuecomment-4122558265
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment `assign set of reviewers`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Security] Bump PostgreSQL JDBC Driver from 42.2.16 to 42.7.10 [beam]
Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on PR #37941:
URL: https://github.com/apache/beam/pull/37941#issuecomment-4137275404
different flaky tests in two runs, not related to this change
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Security] Bump PostgreSQL JDBC Driver from 42.2.16 to 42.7.10 [beam]
Posted by "bvolpato (via GitHub)" <gi...@apache.org>.
bvolpato commented on PR #37941:
URL: https://github.com/apache/beam/pull/37941#issuecomment-4128354220
Run Java_GCP_IO_Direct PreCommit
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Security] Bump PostgreSQL JDBC Driver from 42.2.16 to 42.7.10 [beam]
Posted by "gemini-code-assist[bot] (via GitHub)" <gi...@apache.org>.
gemini-code-assist[bot] commented on PR #37941:
URL: https://github.com/apache/beam/pull/37941#issuecomment-4121818011
## Summary of Changes
Hello, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request enhances the project's security by updating the PostgreSQL JDBC Driver to a newer version. This critical update mitigates several known vulnerabilities, ensuring applications are protected against potential exploits without requiring changes to the public API or existing test suites.
### Highlights
* **PostgreSQL JDBC Driver Upgrade**: Upgraded the PostgreSQL JDBC Driver from version "42.2.16" to "42.7.10" to incorporate critical security fixes.
* **Security Vulnerability Resolution**: Addressed multiple critical and high-severity CVEs, including CVE-2024-1597 (SQL injection), CVE-2022-31197 (SQL injection), and CVE-2022-21724 (code execution via plugin instantiation).
* **Changelog Update**: Added an entry to "CHANGES.md" documenting the security fixes for the 2.73.0 release.
🧠 **New Feature in Public Preview:** You can now enable **Memory** to help **Gemini Code Assist** learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. **Click [here](https://codeassist.google/code-review/login) to enable Memory in your admin console.**
<details>
<summary><b>Using Gemini Code Assist</b></summary>
<br>
The full guide for Gemini Code Assist can be found on our [documentation page](https://developers.google.com/gemini-code-assist/docs/review-github-code), here are some quick tips.
<b>Invoking Gemini</b>
You can request assistance from Gemini at any point by creating a comment using either `/gemini <command>` or `@gemini-code-assist <command>`. Below is a summary of the supported commands on the current page.
Feature | Command | Description
--- | --- | ---
Code Review | `/gemini review` | Performs a code review for the current pull request in its current state.
Pull Request Summary | `/gemini summary` | Provides a summary of the current pull request in its current state.
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help | `/gemini help` | Displays a list of available commands.
<b>Customization</b>
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a `.gemini/` folder in the base of the repository. Detailed instructions can be found [here](https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github).
<b>Limitations & Feedback</b>
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up [here](https://google.qualtrics.com/jfe/form/SV_2cyuGuTWsEw84yG).
</details>
[^1]: Review the [Privacy Notices](https://policies.google.com/privacy), [Generative AI Prohibited Use Policy](https://policies.google.com/terms/generative-ai/use-policy), [Terms of Service](https://policies.google.com/terms), and learn how to configure Gemini Code Assist in GitHub [here](https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github). Gemini can make mistakes, so double check it and [use code with caution](https://support.google.com/legal/answer/13505487).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Security] Bump PostgreSQL JDBC Driver from 42.2.16 to 42.7.10 [beam]
Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn commented on PR #37941:
URL: https://github.com/apache/beam/pull/37941#issuecomment-4146226034
it appears this broke https://github.com/apache/beam/actions/workflows/beam_PreCommit_Java_Debezium_IO_Direct.yml?query=event%3Aschedule
```
testDebeziumSchemaTransformPostgresRead (org.apache.beam.io.debezium.DebeziumIOPostgresSqlConnectorIT) failed
java.lang.AssertionError: AnonymousTransform/DebeziumIO.Read/ParDo(KafkaSourceConsumer)/ParMultiDo(KafkaSourceConsumer).output:
Expected: <504>
but: was <4>
at org.apache.beam.sdk.testing.PAssert$PAssertionSite.capture(PAssert.java:176)
at org.apache.beam.sdk.testing.PAssert.that(PAssert.java:461)
at org.apache.beam.sdk.testing.PAssert.that(PAssert.java:453)
at org.apache.beam.io.debezium.DebeziumIOPostgresSqlConnectorIT.testDebeziumSchemaTransformPostgresRead(DebeziumIOPostgresSqlConnectorIT.java:139)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Security] Bump PostgreSQL JDBC Driver from 42.2.16 to 42.7.10 [beam]
Posted by "Abacn (via GitHub)" <gi...@apache.org>.
Abacn merged PR #37941:
URL: https://github.com/apache/beam/pull/37941
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Security] Bump PostgreSQL JDBC Driver from 42.2.16 to 42.7.10 [beam]
Posted by "bvolpato (via GitHub)" <gi...@apache.org>.
bvolpato commented on PR #37941:
URL: https://github.com/apache/beam/pull/37941#issuecomment-4128343534
The failure is caused by the flaky `SpannerChangeStreamOrderedByTimestampAndTransactionIdIT.testTransactionBoundaries` test (tracked as [#35868](https://github.com/apache/beam/issues/35868)). This is completely unrelated to the PostgreSQL JDBC driver upgrade.
Retriggering: Run Java_GCP_IO_Direct PreCommit
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Security] Bump PostgreSQL JDBC Driver from 42.2.16 to 42.7.10 [beam]
Posted by "shunping (via GitHub)" <gi...@apache.org>.
shunping commented on PR #37941:
URL: https://github.com/apache/beam/pull/37941#issuecomment-4137419466
You rocks, @bvolpato! Thank you very much!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org