-
Notifications
You must be signed in to change notification settings - Fork 47
Closed
Description
Issue Description
We are using the PostgreSQL image (17) based on Debian OS (Bookworm) with CloudNativePG in our Kubernetes cluster. While scanning the image for vulnerabilities, we identified several critical issues. We need guidance from the CNPG community to address these vulnerabilities in the image version used by CNPG.
Critical Vulnerabilities Identified
-
- Package: zlib1g
- Description: Integer overflow in
zipOpenNewFileInZip4_6
leads to a heap-based buffer overflow. - Severity: Critical
- Status:
will_not_fix
-
- Package: Go runtime (
html/template
) - Description: Backticks are not treated as string delimiters, which may allow code injection.
- Severity: Critical
- Status: Fixed in Go v1.18.2, v1.19.8, v1.20.3
- Package: Go runtime (
-
- Package: Go runtime (
html/template
) - Description: Improper handling of JavaScript whitespace could allow XSS attacks.
- Severity: Critical
- Status: Fixed in Go v1.19.9, v1.20.4
- Package: Go runtime (
-
- Package: Go runtime (
net/netip
) - Description: Unexpected behavior in
Is
methods for IPv4-mapped IPv6 addresses could bypass IP-based restrictions. - Severity: High
- Status: Fixed in Go v1.21.11, v1.22.4
- Package: Go runtime (
Impact on Cluster Security
While PostgreSQL itself is not directly impacted, associated vulnerabilities in the image pose a risk:
- Possible code injection or XSS attacks from Go-based utilities using vulnerable
html/template
. - Improper IP-based access control due to
net/netip
issues. - Heap-based buffer overflow risk from zlib, potentially allowing malicious data processing.
Request for Guidance
- Are there updated PostgreSQL images compatible with CNPG that address these vulnerabilities?
- If not, what is the recommended approach to mitigate these issues in the current image version?
- Should we consider custom-building an image with patched dependencies? If so, are there any best practices for ensuring compatibility with CNPG?
Environment Details
- CNPG Version: 1.25.0
- PostgreSQL Image Version: 17.2-28-bookworm
We look forward to the community's insights and recommendations. Thank you!
Metadata
Metadata
Assignees
Labels
No labels