Skip to content

fix(webhook): reject extension paths that escape via absolute traversal - #11210

Merged
mnencia merged 7 commits into
cloudnative-pg:mainfrom
Anand-240:dev/extension-path-validation
Jul 30, 2026
Merged

mnencia merged 7 commits into
cloudnative-pg:mainfrom
Anand-240:dev/extension-path-validation

Conversation

@Anand-240

@Anand-240 Anand-240 commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

validateExtensions accepted absolute paths with embedded traversal (e.g. "/a/../../../../etc") because it only checked the cleaned raw path for a ".." prefix. CollectBinPaths and absolutizePaths join these paths under the extension's mount point at runtime, and that join resolves the embedded ".." against the real mount point, so the accepted value still escaped it.

Resolve each path against "." with filepath.Join, then check the result with filepath.IsLocal. This is independent of the extension mount point's actual depth, since IsLocal guarantees containment against any base rather than requiring the check to mirror the real (multi-segment) mount point. Plain absolute-looking paths (e.g. /opt/custom/lib) keep working, since joining under "." first strips a leading separator the same way the runtime join does.

CollectLibraryPaths, CollectBinPaths, and absolutizePaths apply the same check directly, skipping any entry that fails it. This covers callers that read the Cluster spec without going through admission, such as the major-upgrade Job, and Clusters whose spec was already persisted before this fix.

This check is lexical, on the path string only; it doesn't cover symlinks inside the extension's own image content, which is a separate trust boundary tied to the image reference itself.

Closes #11208

@Anand-240
Anand-240 requested a review from a team July 15, 2026 21:18
@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Jul 15, 2026
@cnpg-bot cnpg-bot added backport-requested ◀️ This pull request should be backported to all supported releases release-1.28 release-1.29 labels Jul 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

❗ By default, the pull request is configured to backport to all release branches.

  • To stop backporting this pr, remove the label: backport-requested ◀️ or add the label 'do not backport'
  • To stop backporting this pr to a certain release branch, remove the specific branch label: release-x.y

@gbartolini

Copy link
Copy Markdown
Contributor

Thanks for tracking down the bypass. Nice catch on the leading separator interaction with filepath.Join.

Here is a basic review, assisted by Claude.

Suggested approach

One suggestion on the approach. Rather than inferring escape from the raw path string (strip a leading separator, filepath.Clean, check for a .. prefix), it would be more direct to resolve the path the same way the runtime does and check containment on the result:

resolvedPath := filepath.Join(extensionMountPointPlaceholder, path)
if resolvedPath != extensionMountPointPlaceholder &&
    !strings.HasPrefix(resolvedPath, extensionMountPointPlaceholder+string(filepath.Separator)) {
    // reject: escapes the extension's mount point
}

where extensionMountPointPlaceholder is a fixed synthetic base (e.g. /mount) standing in for whatever CollectBinPaths / CollectLibraryPaths / absolutizePaths actually join the path onto at runtime.

A placeholder is used instead of the real value on purpose. The webhook validates the Cluster spec at admission time, before any pod exists, and the real base directory (postgres.ExtensionsBaseDirectory or postgres.UpgradeTargetExtensionsBaseDirectory, joined with the extension name) is only computed later by the instance manager, and even then it differs between the two phases of a major version upgrade. The containment check does not need that real value to be correct: filepath.Join's .. resolution is purely syntactic, so whether the result stays under the base depends only on the shape of path, not on what the base actually is. Any fixed placeholder therefore gives the same answer as the real value would, without tying the webhook to instance manager runtime constants.

Why this is preferable

  • It mirrors the actual runtime join (filepath.Join(baseDir, ...)) instead of relying on the indirect (if valid) property that "a cleaned relative path starting with .. implies escape." That property is correct, but it takes a paragraph of comment to justify. "Join against a sentinel base and check it is still inside" is self evidently correct by inspection. It is the same containment check used for zip slip prevention.
  • It drops the manual strings.TrimPrefix(path, string(filepath.Separator)) step. That step is exactly modeling what filepath.Join already does, so we may as well call filepath.Join itself rather than reimplementing its leading separator handling by hand.
  • One thing to watch: the containment check must compare with a separator boundary (resolvedPath == base || strings.HasPrefix(resolvedPath, base+"/")), not a bare strings.HasPrefix(resolvedPath, base). Otherwise /mount would wrongly accept something that resolves to /mount-evil.

Since all four fields (extension_control_path, dynamic_library_path, ld_library_path, bin_path) are joined onto a single fixed base at runtime (just with different base paths depending on the caller), one synthetic sentinel base works uniformly for the webhook check.

Worth noting on the docs side

Per docs/src/imagevolume_extensions.md, all four of these fields are documented as taking relative paths within the container image:

  • extension_control_path: A list of relative paths within the container image to be appended to PostgreSQL's extension_control_path...
  • dynamic_library_path: A list of relative paths within the container image to be appended to PostgreSQL's dynamic_library_path...
  • ld_library_path: A list of relative paths within the container image to be appended to the LD_LIBRARY_PATH environment variable...
  • bin_path: A list of relative paths within the container image to be appended to the PATH environment variable...

So an absolute-looking value such as /opt/custom/lib is already outside the documented contract. It is only accepted today because CollectBinPaths and friends treat a leading / as equivalent to no leading separator when joining. That equivalence is what both the current fix and the containment based approach need to preserve for backward compatibility, but it is worth keeping in mind that the "real" contract is relative paths only, and the validation exists to make sure that contract cannot be subverted regardless of how the value is spelled.

Tests

The two new test cases you added (embedded traversal rejection, leading / without escape acceptance) are exactly the right ones to keep. They would just need to double as regression tests for the containment based implementation too.

@Anand-240
Anand-240 force-pushed the dev/extension-path-validation branch from a920b42 to f9f8f89 Compare July 23, 2026 04:42
@Anand-240

Copy link
Copy Markdown
Contributor Author

Updated to the containment check with the placeholder base, and fixed the separator boundary issue you pointed out. Kept both test cases since you're right that they work as regression tests either way. Pushed.

@gbartolini
gbartolini force-pushed the dev/extension-path-validation branch 2 times, most recently from bfa7fcf to 71558ec Compare July 25, 2026 00:43
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jul 25, 2026
@gbartolini

Copy link
Copy Markdown
Contributor

Thanks a lot @Anand-240, looks good to me!

@gbartolini

Copy link
Copy Markdown
Contributor

/test

@github-actions

Copy link
Copy Markdown
Contributor

@GabriFedi97
GabriFedi97 force-pushed the dev/extension-path-validation branch 2 times, most recently from f4dce69 to 2a61f6f Compare July 28, 2026 08:42
Comment thread internal/webhook/v1/cluster_webhook.go Resolved
@GabriFedi97
GabriFedi97 force-pushed the dev/extension-path-validation branch from 8b6ebf6 to 3059af7 Compare July 29, 2026 07:50
@NiccoloFei
NiccoloFei force-pushed the dev/extension-path-validation branch from 3059af7 to dd7c6b9 Compare July 29, 2026 13:52
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Jul 29, 2026
@mnencia

mnencia commented Jul 29, 2026

Copy link
Copy Markdown
Member

/test

@github-actions

Copy link
Copy Markdown
Contributor

Anand-240 and others added 7 commits July 29, 2026 22:09
validateExtensions rejected relative traversal ("../etc") in the
extension_control_path / dynamic_library_path / ld_library_path / bin_path
lists, but checked filepath.Clean(path) directly. An absolute path with
embedded traversal, e.g. "/a/../../../../etc", cleans to "/etc" and so
never starts with "..", letting it through.

At runtime, absolutizePaths and CollectBinPaths join these paths under the
extension's mount point with filepath.Join, so the accepted value still
escapes the mount point once joined.

Resolve the path the same way those callers join it under the extension's
mount point at runtime, using a synthetic placeholder base, and check
containment on the result instead of inferring escape from the shape of the
raw string. filepath.Join's "." resolution is purely syntactic, so any
fixed placeholder gives the same containment answer the real mount point
would, and this mirrors the runtime join rather than reimplementing its
leading-separator handling by hand. The containment check requires a
separator boundary rather than a bare prefix match, so a path resolving to
the base plus a suffix (e.g. the base directory name with '-evil' appended)
is not wrongly accepted.

Plain absolute-looking paths such as the existing /opt/custom/{lib,bin}
test case keep working, since CollectBinPaths and absolutizePaths already
treat a leading separator as equivalent to none when joining; the
underlying contract documented in docs/src/imagevolume_extensions.md is
relative paths only, and this validation exists to ensure that contract
cannot be subverted regardless of how the value is spelled.

Signed-off-by: Anand-240 <[email protected]>
Move extensionPathContainmentBase from a package-level constant to a
local constant inside validateExtensions, since that is the only place
it is used.

Extend the existing non-escaping-path test with a DynamicLibraryPath
entry containing an embedded ".." that resolves to a location still
inside the extension mount point, to make explicit that a path is only
rejected when it actually escapes the mount point, not merely because
it contains "..".

Signed-off-by: Anand-240 <[email protected]>
Move the placeholder base constant next to its only use and rename it
for clarity, and condense the surrounding comments.

Signed-off-by: Gabriele Fedi <[email protected]>
Improve unit-test titles.
Remove redundant comments, the title is already explanatory enough.

Signed-off-by: Niccolò Fei <[email protected]>
validateExtensions checked containment by joining each path under a
placeholder base "/mount" and verifying the result stayed within it.
That placeholder is a single path segment, but the runtime callers
this check mirrors, absolutizePaths and CollectBinPaths, join paths
under a real, multi-segment mount point (e.g. "/extensions/<name>").
A path like "../mount/lib" resolves within the shallow placeholder
but still escapes the real, deeper mount point, so it passed
validation while still being able to escape at runtime.

Resolving the path against "." and checking the result with
filepath.IsLocal instead removes the base entirely, so the
containment answer no longer depends on matching the real mount
point's depth.

Signed-off-by: Marco Nenciarini <[email protected]>
validateExtensions rejects escaping ExtensionControlPath, DynamicLibraryPath,
LdLibraryPath, and BinPath entries at admission time, but CollectLibraryPaths,
CollectBinPaths, and absolutizePaths are also called from the major-upgrade
Job (internal/cmd/manager/instance/upgrade/execute), which reads the Cluster
spec directly without going through admission.

Skip any entry that fails filepath.IsLocal(filepath.Join(".", path)) in these
three functions, logging a warning, instead of relying solely on the webhook
having already validated the spec.

Signed-off-by: Marco Nenciarini <[email protected]>
@mnencia
mnencia force-pushed the dev/extension-path-validation branch from 3640dcf to dbc41c9 Compare July 29, 2026 20:10
@mnencia

mnencia commented Jul 30, 2026

Copy link
Copy Markdown
Member

/ok-to-merge gree E2E

@cnpg-bot cnpg-bot added the ok to merge 👌 This PR can be merged label Jul 30, 2026
@mnencia
mnencia merged commit fe3f2c0 into cloudnative-pg:main Jul 30, 2026
33 of 34 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Security Map Jul 30, 2026
cnpg-bot pushed a commit that referenced this pull request Jul 30, 2026
…al (#11210)

`validateExtensions` accepted absolute paths with embedded traversal
(e.g. "/a/../../../../etc") because it only checked the cleaned raw path
for a ".." prefix. `CollectBinPaths` and `absolutizePaths` join these
paths under the extension's mount point at runtime, and that join
resolves the embedded ".." against the real mount point, so the accepted
value still escaped it.

Resolve each path against "." with `filepath.Join`, then check the
result with `filepath.IsLocal`. This is independent of the extension
mount point's actual depth, since `IsLocal` guarantees containment
against any base rather than requiring the check to mirror the real
(multi-segment) mount point. Plain absolute-looking paths (e.g.
/opt/custom/lib) keep working, since joining under "." first strips a
leading separator the same way the runtime join does.

`CollectLibraryPaths`, `CollectBinPaths`, and `absolutizePaths` apply
the same check directly, skipping any entry that fails it. This covers
callers that read the Cluster spec without going through admission, such
as the major-upgrade Job, and Clusters whose spec was already persisted
before this fix.

This check is lexical, on the path string only; it doesn't cover
symlinks inside the extension's own image content, which is a separate
trust boundary tied to the image reference itself.

Closes #11208

Signed-off-by: Anand-240 <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Fedi <[email protected]>
Signed-off-by: Niccolò Fei <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Co-authored-by: Gabriele Bartolini <[email protected]>
Co-authored-by: Gabriele Fedi <[email protected]>
Co-authored-by: Niccolò Fei <[email protected]>
Co-authored-by: Marco Nenciarini <[email protected]>
(cherry picked from commit fe3f2c0)
cnpg-bot pushed a commit that referenced this pull request Jul 30, 2026
…al (#11210)

`validateExtensions` accepted absolute paths with embedded traversal
(e.g. "/a/../../../../etc") because it only checked the cleaned raw path
for a ".." prefix. `CollectBinPaths` and `absolutizePaths` join these
paths under the extension's mount point at runtime, and that join
resolves the embedded ".." against the real mount point, so the accepted
value still escaped it.

Resolve each path against "." with `filepath.Join`, then check the
result with `filepath.IsLocal`. This is independent of the extension
mount point's actual depth, since `IsLocal` guarantees containment
against any base rather than requiring the check to mirror the real
(multi-segment) mount point. Plain absolute-looking paths (e.g.
/opt/custom/lib) keep working, since joining under "." first strips a
leading separator the same way the runtime join does.

`CollectLibraryPaths`, `CollectBinPaths`, and `absolutizePaths` apply
the same check directly, skipping any entry that fails it. This covers
callers that read the Cluster spec without going through admission, such
as the major-upgrade Job, and Clusters whose spec was already persisted
before this fix.

This check is lexical, on the path string only; it doesn't cover
symlinks inside the extension's own image content, which is a separate
trust boundary tied to the image reference itself.

Closes #11208

Signed-off-by: Anand-240 <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Fedi <[email protected]>
Signed-off-by: Niccolò Fei <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Co-authored-by: Gabriele Bartolini <[email protected]>
Co-authored-by: Gabriele Fedi <[email protected]>
Co-authored-by: Niccolò Fei <[email protected]>
Co-authored-by: Marco Nenciarini <[email protected]>
(cherry picked from commit fe3f2c0)
mnencia added a commit that referenced this pull request Jul 30, 2026
…al (#11210)

`validateExtensions` accepted absolute paths with embedded traversal
(e.g. "/a/../../../../etc") because it only checked the cleaned raw path
for a ".." prefix. `CollectBinPaths` and `absolutizePaths` join these
paths under the extension's mount point at runtime, and that join
resolves the embedded ".." against the real mount point, so the accepted
value still escaped it.

Resolve each path against "." with `filepath.Join`, then check the
result with `filepath.IsLocal`. This is independent of the extension
mount point's actual depth, since `IsLocal` guarantees containment
against any base rather than requiring the check to mirror the real
(multi-segment) mount point. Plain absolute-looking paths (e.g.
/opt/custom/lib) keep working, since joining under "." first strips a
leading separator the same way the runtime join does.

`CollectLibraryPaths`, `CollectBinPaths`, and `absolutizePaths` apply
the same check directly, skipping any entry that fails it. This covers
callers that read the Cluster spec without going through admission, such
as the major-upgrade Job, and Clusters whose spec was already persisted
before this fix.

This check is lexical, on the path string only; it doesn't cover
symlinks inside the extension's own image content, which is a separate
trust boundary tied to the image reference itself.

Closes #11208

Signed-off-by: Anand-240 <[email protected]>
Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Gabriele Fedi <[email protected]>
Signed-off-by: Niccolò Fei <[email protected]>
Signed-off-by: Marco Nenciarini <[email protected]>
Co-authored-by: Gabriele Bartolini <[email protected]>
Co-authored-by: Gabriele Fedi <[email protected]>
Co-authored-by: Niccolò Fei <[email protected]>
Co-authored-by: Marco Nenciarini <[email protected]>
(cherry picked from commit fe3f2c0)
renovate Bot added a commit to sdwilsh/ansible-playbooks that referenced this pull request Sep 24, 2026
##### [\`v1.30.1\`](https://github.com/cloudnative-pg/cloudnative-pg/releases/tag/v1.30.1)

**Release date:** Sep 23, 2026

##### Enhancements

- Added `restoreAdditionalCommandArgs` to `.barmanObjectStore.data` for in-tree Barman Cloud recoveries, so custom flags are forwarded to `barman-cloud-restore` during recovery. ([#11278](cloudnative-pg/cloudnative-pg#11278)) <!-- 1.29 1.28 -->

- Plugin authors no longer need to re-derive whether an empty WAL archive should be treated as an error: the operator now computes the `check_empty_wal_archive` decision once and passes it to CNPG-I plugins on both WAL archiving and restore hooks. ([#11216](cloudnative-pg/cloudnative-pg#11216)) <!-- 1.29 1.28 -->

- Allowed setting the `ssl_ecdh_curve` PostgreSQL parameter in `.spec.postgresql.parameters`. It was previously rejected by the validating webhook even though the operator does not manage it. Contributed by [@Jamstah](https://github.com/Jamstah). ([#11308](cloudnative-pg/cloudnative-pg#11308)) <!-- 1.29 1.28 -->

- Added support for setting `auth_user` in `spec.pgbouncer.parameters` to override the user PgBouncer uses for its `auth_query` connection, instead of always deriving it from the `authQuerySecret`. Useful with a custom `authQuerySecret` where the role to authenticate as differs from the one implied by the Secret. Contributed by [@jonasbadstuebner](https://github.com/jonasbadstuebner). ([#10899](cloudnative-pg/cloudnative-pg#10899)) <!-- 1.29 1.28 -->

- Fixed PgBouncer metrics silently reporting zero when PgBouncer adds or reorders columns: `SHOW STATS` and `SHOW POOLS` results are now matched by column name instead of by position. Contributed by [@AdzerKI](https://github.com/AdzerKI) (`SHOW STATS`). ([#11366](cloudnative-pg/cloudnative-pg#11366), [#11464](cloudnative-pg/cloudnative-pg#11464)) <!-- 1.29 1.28 -->

- `cnpg` plugin:

  - Added a `--dry-run` option to the `backup` command that prints the `Backup` resource that would be created, without creating it. ([#11233](cloudnative-pg/cloudnative-pg#11233)) <!-- 1.29 1.28 -->

##### Security and Supply Chain

- Fixed a webhook validation bypass where an absolute extension path with an embedded `..` traversal (e.g. `/a/../../../../etc`) was accepted because only the raw path was checked; such paths still escaped the extension's mount point once resolved at runtime. Affected entries are now resolved and rejected/skipped consistently across admission, the major-upgrade job, and already-persisted Cluster specs. Contributed by [@Anand-240](https://github.com/Anand-240). ([#11210](cloudnative-pg/cloudnative-pg#11210)) <!-- 1.29 1.28 -->

- Updated `google.golang.org/grpc` to v1.83.1, fixing [CVE-2026-84304](https://nvd.nist.gov/vuln/detail/CVE-2026-84304) / GHSA-vp52-pcj8-j9qc (gRPC-Go heap memory exhaustion via HTTP/2 DATA frame fragmentation). ([#11394](cloudnative-pg/cloudnative-pg#11394)) <!-- 1.29 1.28 -->

##### Changes

- Updated the default PostgreSQL operand image to 18.6-system-trixie. ([#11257](cloudnative-pg/cloudnative-pg#11257)) <!-- 1.29 1.28 -->

- Moved the operator's own base image from Debian 12 (bookworm) to Debian 13 (trixie), now that Debian 12 has moved to LTS-only maintenance. ([#11193](cloudnative-pg/cloudnative-pg#11193)) <!-- 1.29 1.28 -->

##### Fixes

- Demoted an unreachable old primary immediately during failover, instead of waiting on checkpoint and fast-shutdown attempts that could never complete. Previously, an old primary whose PostgreSQL had become unresponsive was never shut down, so it could never rejoin the cluster as a replica of the new primary. The shutdown is now requested without blocking the reconciler, though demotion can still take up to a minute or more if PostgreSQL keeps ignoring shutdown signals. ([#11347](cloudnative-pg/cloudnative-pg#11347)) <!-- 1.29 1.28 -->

- Fixed failover and Pod recreation getting stuck while any instance in the cluster was fenced. A fenced instance kept reporting itself as healthy on its status endpoint even though its Pod was permanently not Ready, which blocked the readiness guard, the primary-election logic, and the Pod-reattachment gate from reacting to an unrelated failure elsewhere in the cluster, leaving it stalled until someone manually removed the fencing. All three now recognize and skip fenced instances. ([#11274](cloudnative-pg/cloudnative-pg#11274)) <!-- 1.29 1.28 -->

- Fixed a failover that could stall forever or get silently reverted. While a failover was pending, the reconciler could skip checking whether it was ready to complete, or mistake the pending state for a missing Pod and reset the target primary back to the unhealthy one. It now keeps progressing a pending failover and completes it once the WAL receivers are down, rechecking quorum safety right before promoting in case it changed while waiting. ([#11336](cloudnative-pg/cloudnative-pg#11336)) <!-- 1.29 1.28 -->

- Fixed the designated-primary sort in `PostgresqlStatusList` so a tie on LSN no longer sorts it out of order. If the designated primary's Pod later disappeared from the status list, this could have led the operator to promote the wrong standby. ([#11494](cloudnative-pg/cloudnative-pg#11494)) <!-- 1.29 1.28 -->

- Gated PostgreSQL startup on the instance manager actually holding the primary `Lease`, closing a window where a restarting or rescheduled primary could start accepting writes before acquiring the lease. Lease acquisition now happens during instance initialization, strictly before PostgreSQL is allowed to start, instead of only later in the reconciliation loop once the instance was already reported ready. ([#11356](cloudnative-pg/cloudnative-pg#11356))

- Bounded the primary lease take-over `Get` call to the lease's `RenewDeadline`, so a call against an unreachable API server now fails fast and retries instead of blocking indefinitely. Left unbounded, the same stalled call could also delay a primary's own lease renewal after a transient API server blip, risking an unwanted takeover by another instance once the lease appeared to expire. ([#11350](cloudnative-pg/cloudnative-pg#11350))

- Stopped abandoning a fast shutdown after 60 seconds. The request carried no explicit timeout, so `pg_ctl` fell back to its own implicit 60-second limit, and the instance manager, being PID 1 in the container, took PostgreSQL down mid-shutdown regardless of a larger configured `stopDelay`. The fast phase now waits for the full `stopDelay` instead. ([#11263](cloudnative-pg/cloudnative-pg#11263)) <!-- 1.29 1.28 -->

- Waited for certificate status before refreshing secrets during bootstrap. ([#11450](cloudnative-pg/cloudnative-pg#11450)) <!-- 1.29 1.28 -->

- Fixed in-tree Barman Cloud recovery ignoring `wal.maxParallel` and `wal.restoreAdditionalCommandArgs`, fetching WAL one segment at a time instead of using the configured parallelism. ([#11105](cloudnative-pg/cloudnative-pg#11105)) <!-- 1.29 1.28 -->

- Honored the `unrecoverable` annotation on pending and terminating instances. ([#11241](cloudnative-pg/cloudnative-pg#11241)) <!-- 1.29 1.28 -->

- Honored `Backup.spec.online` when finalizing VolumeSnapshot-based backups, so a cold backup is no longer reported as online in status. ([#11276](cloudnative-pg/cloudnative-pg#11276)) <!-- 1.29 1.28 -->

- Set `--no-data-checksums` explicitly when `.spec.postgresql.dataChecksums` is `false` on PostgreSQL 18+, which now enables checksums by default in `initdb`. Contributed by [@evan314159](https://github.com/evan314159). ([#11488](cloudnative-pg/cloudnative-pg#11488)) <!-- 1.29 1.28 -->

- Stopped discarding `.spec.inheritedMetadata` labels on PVC reconciliation; they were applied before, and then overwritten by, the operator's own labels. Contributed by [@GellertBabel](https://github.com/GellertBabel). ([#11499](cloudnative-pg/cloudnative-pg#11499)) <!-- 1.29 1.28 -->

- Stopped `Pooler` and `DatabaseRole` from recreating their owned resources after being marked for deletion, which could block an external finalizer (e.g. ArgoCD foreground deletion) waiting for those resources to disappear. Contributed by [@mjlshen](https://github.com/mjlshen). ([#11359](cloudnative-pg/cloudnative-pg#11359)) <!-- 1.29 1.28 -->

- Handled a `NULL` `stats_reset` value in the `pg_stat_wal` metric, which could occasionally break Prometheus scraping on PostgreSQL 18 clusters. Contributed by [@HoniSanders](https://github.com/HoniSanders). ([#11207](cloudnative-pg/cloudnative-pg#11207)) <!-- 1.29 1.28 -->

- Recovered log streaming when a stale non-FIFO file blocked the log pipe. ([#11246](cloudnative-pg/cloudnative-pg#11246)) <!-- 1.29 1.28 -->

- Stopped sampling logs of the Pods' processes, so no log lines are silently dropped. ([#11131](cloudnative-pg/cloudnative-pg#11131)) <!-- 1.29 1.28 -->

- Stopped caching Helm release Secrets in the operator, which could spike memory usage and crashloop the operator on clusters with large Helm releases installed alongside it. ([#11211](cloudnative-pg/cloudnative-pg#11211)) <!-- 1.29 1.28 -->

- Re-ran owned-resource finalizer cleanup after an operator restart, so a namespace deleted while the operator was down doesn't hang in `Terminating` forever. ([#11215](cloudnative-pg/cloudnative-pg#11215)) <!-- 1.29 1.28 -->

- Fixed rejoining replicas taking a long time to complete `pg_rewind` when WAL prefetching (`wal.maxParallel > 1`) was enabled. ([#11204](cloudnative-pg/cloudnative-pg#11204)) <!-- 1.29 1.28 -->

- Treated a PostgreSQL instance rejecting connections as started up in probes. ([#11152](cloudnative-pg/cloudnative-pg#11152)) <!-- 1.29 1.28 -->

- Stopped issuing a redundant PATCH on every reconciliation when a cluster's `pvcTemplate` set `volumeAttributesClass`. Contributed by [@andrew-farries](https://github.com/andrew-farries). ([#11196](cloudnative-pg/cloudnative-pg#11196)) <!-- 1.29 1.28 -->

- Stopped halting replication slot reconciliation at the first failing slot. ([#11119](cloudnative-pg/cloudnative-pg#11119)) <!-- 1.29 1.28 -->

- During rollouts, compared the running configuration hash, rather than the on-disk one, avoiding unnecessary switchovers. ([#11130](cloudnative-pg/cloudnative-pg#11130)) <!-- 1.29 1.28 -->

- Retried `VolumeSnapshot` errors until the deadline, instead of giving up early. ([#11132](cloudnative-pg/cloudnative-pg#11132)) <!-- 1.29 1.28 -->

- Symlinked `pg_wal` to the WAL volume during plugin-based recovery, instead of replaying WAL onto the data volume, which could exhaust it on a large point-in-time recovery. ([#11127](cloudnative-pg/cloudnative-pg#11127)) <!-- 1.29 1.28 -->

- Corrected grammar in `PhaseUpgradeDelayed` status messages. Contributed by [@Utkarsh-sharma47](https://github.com/Utkarsh-sharma47). ([#11065](cloudnative-pg/cloudnative-pg#11065)) <!-- 1.29 1.28 -->

- CloudNativePG Interface (CNPG-I):

  - Reported the Postgres capabilities of a plugin correctly. ([#11447](cloudnative-pg/cloudnative-pg#11447)) <!-- 1.29 1.28 -->
  - Prevented the plugin status field from flapping on Cluster reconciliation. Contributed by [@sharifmshaker](https://github.com/sharifmshaker). ([#11386](cloudnative-pg/cloudnative-pg#11386)) <!-- 1.29 1.28 -->
  - Replaced a finalizer with in-memory cleanup on Service deletion. This avoids namespaces hanging in `Terminating` state when the operator and its plugins run in the same namespace. Contributed by [@maxlengdell](https://github.com/maxlengdell). ([#10940](cloudnative-pg/cloudnative-pg#10940)) <!-- 1.29 -->

- `cnpg` plugin:

  - Used UTC time zone for the default backup name. ([#11329](cloudnative-pg/cloudnative-pg#11329)) <!-- 1.29 1.28 -->
  - Deleted PVCs before Pods in `cnpg destroy`, avoiding a race that could leave dangling PVCs needing a second invocation to clean up. Contributed by [@daanvinken](https://github.com/daanvinken). ([#10847](cloudnative-pg/cloudnative-pg#10847)) <!-- 1.29 1.28 -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-requested ◀️ This pull request should be backported to all supported releases lgtm This PR has been approved by a maintainer ok to merge 👌 This PR can be merged release-1.28 release-1.30 security 👮 size:M This PR changes 30-99 lines, ignoring generated files.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Bug]: Extension path validation accepts absolute paths that escape the extension directory

6 participants