CVE-2026-6475: PostgreSQL Symlink Vulnerability Allows Superuser Hijack

CVE-2026-6475: PostgreSQL Symlink Vulnerability Allows Superuser Hijack

The National Vulnerability Database has detailed CVE-2026-6475, a symlink following vulnerability in PostgreSQL’s pg_basebackup (plain format) and pg_rewind utilities. This flaw allows an originating superuser to overwrite local files, such as /var/lib/postgres/.bashrc, which can lead to the hijacking of the operating system account. This isn’t a direct remote code execution, but a post-exploitation path that can be leveraged.

The attack’s practical implications hinge on specific actions taken between the execution of these commands and the server’s restart. For instance, moving affected files to a different VM or snapshotting the VM between the compromise and server restart would enable the attack. The core issue is that starting the server after these commands implicitly trusts the origin superuser, especially due to features like shared_preload_libraries which can be exploited for privilege escalation.

Versions of PostgreSQL prior to 18.4, 17.10, 16.14, 15.18, and 14.23 are affected. The National Vulnerability Database assigns this a CVSS score of 8.8 (HIGH), underscoring the severity of potential account takeover and subsequent system compromise. Defenders need to understand that this is a trust exploitation scenario, not a zero-day RCE, but it opens a door for a malicious insider or an attacker who has already gained superuser privileges to establish persistence and further compromise the system.

What This Means For You

  • If your organization uses PostgreSQL, you need to verify your database versions immediately. Patch any instances running versions prior to 18.4, 17.10, 16.14, 15.18, or 14.23. This isn't just about data integrity; it's about preventing an already compromised superuser from gaining persistent operating system-level control. Audit your `pg_basebackup` and `pg_rewind` usage, and scrutinize any file modifications in `/var/lib/postgres/` or similar paths before server restarts, especially after migration or recovery operations.

Related ATT&CK Techniques

🛡️ Detection Rules

3 rules · 6 SIEM formats

3 detection rules auto-generated for this incident, mapped to MITRE ATT&CK. Sigma YAML is free — export to any SIEM format via the Intel Bot.

critical T1574.006 Persistence

CVE-2026-6475: PostgreSQL pg_basebackup/pg_rewind Symlink to Bashrc Overwrite

Sigma YAML — free preview
title: CVE-2026-6475: PostgreSQL pg_basebackup/pg_rewind Symlink to Bashrc Overwrite
id: scw-2026-05-14-ai-1
status: experimental
level: critical
description: |
  Detects the modification of the .bashrc file within the PostgreSQL data directory, specifically targeting the behavior described in CVE-2026-6475 where pg_basebackup or pg_rewind symlink following can lead to the overwrite of this file, enabling OS account hijacking.
author: SCW Feed Engine (AI-generated)
date: 2026-05-14
references:
  - https://shimiscyberworld.com/posts/nvd-CVE-2026-6475/
tags:
  - attack.persistence
  - attack.t1574.006
logsource:
    category: file_event
detection:
  selection:
      TargetFilename|endswith:
          - '.bashrc'
      EventType: 'modify'
  selection_base:
      TargetFilename|contains:
          - '/var/lib/postgres/'
  condition: selection AND selection_base
falsepositives:
  - Legitimate administrative activity

Source: Shimi's Cyber World · License & reuse

✓ Sigma · Splunk SPL Sentinel KQL Elastic QRadar AQL Wazuh Get rules for your SIEM →

Indicators of Compromise

IDTypeIndicator
CVE-2026-6475 Vulnerability CVE-2026-6475
Source & Attribution
Source PlatformNVD
ChannelNational Vulnerability Database
PublishedMay 14, 2026 at 17:16 UTC

This content was AI-rewritten and enriched by Shimi's Cyber World based on the original source. All intellectual property rights remain with the original author.

Believe this infringes your rights? Submit a takedown request.

Related coverage

CVE-2026-44482: SoundCloud Client RCE via Malicious Track Metadata

CVE-2026-44482 — soundcloud-rpc is a SoundCloud Client with Discord Rich Presence, Dark Mode, Last.fm and AdBlock support. Prior to 0.1.8, a track title containing an...

vulnerabilityCVEcriticalhigh-severitycwe-20cwe-79cwe-94cwe-862
/SCW Vulnerability Desk /CRITICAL /9.6 /⚑ 4 IOCs /⚙ 3 Sigma

Nerdbank.MessagePack Stack Overflow Vulnerability (CVE-2026-44375) Patched

CVE-2026-44375 — Nerdbank.MessagePack is a NativeAOT-compatible MessagePack serialization library. Prior to 1.1.62, Nerdbank.MessagePack contains an uncontrolled stack allocation vulnerability in DateTime decoding. A malicious MessagePack...

vulnerabilityCVEhigh-severitycwe-789
/SCW Vulnerability Desk /HIGH /7.5 /⚑ 3 IOCs /⚙ 2 Sigma

CVE-2026-44374 — Information Disclosure

CVE-2026-44374 — Backstage is an open framework for building developer portals. Prior to 0.6.11, the unprocessed entities read endpoints in @backstage/plugin-catalog-backend-module-unprocessed do not enforce permission...

vulnerabilityCVEmedium-severityinformation-disclosurecwe-863
/SCW Vulnerability Desk /MEDIUM /4.3 /⚑ 2 IOCs /⚙ 3 Sigma