{"id":"CVE-2026-16240","kind":"vulnerability","aliases":["CVE-2026-16240"],"related":[],"title":"PostgreSQL: pg_basebackup format string flaw can leak client memory","description":"Use of externally-controlled format string in PostgreSQL pg_basebackup allows an attacker having already compromised a server to achieve disclosure from pg_basebackup memory, via backup manifest bytes.  The vulnerability does not return the improperly-read bytes back to the attacker's server, so a successful attack would need separate implementation-specific secrets for that.  Integrity impact is unlikely; in particular, the applicable formatter does not support %n.  Versions before PostgreSQL 18.7, 17.12, 16.16, 15.20, and 14.25 are affected.","summary":"A flaw in PostgreSQL's pg_basebackup tool lets a server that has already been compromised read bytes from pg_basebackup's memory through crafted backup manifest data. The leaked bytes are not sent back to the attacker, so an exploit would need additional implementation-specific knowledge to recover useful secrets.","severity":"low","cvss":3.7,"epss":null,"exploited":false,"exploited_at":null,"products":[],"ecosystems":[],"tags":["database-backups","pg_basebackup","postgresql","vendor"],"not_affected_if":["not-using-pg_basebackup","trusted-source-servers-only"],"how_to_check":"- Check the installed version with `pg_basebackup --version`\n- Versions before `18.7`, `17.12`, `16.16`, `15.20` and `14.25` are affected","fix":"- Upgrade PostgreSQL to `18.7`, `17.12`, `16.16`, `15.20` or `14.25` for the matching major version","status":"open","published_at":"2026-11-12T15:17:50+00:00","first_seen_at":"2026-11-12T15:41:57+00:00","triaged_at":"2026-11-12T15:44:06+00:00","updated_at":"2026-11-12T15:44:06+00:00","category":"vendor","confidence":0.7,"triage":{"at":"2026-11-12T15:44:06Z","model":"claude-haiku-5-5","output":{"fix":"- Upgrade PostgreSQL to `18.7`, `17.12`, `16.16`, `15.20` or `14.25` for the matching major version","reach":"network","title":"PostgreSQL: pg_basebackup format string flaw can leak client memory","impact":"low","summary":"A flaw in PostgreSQL's pg_basebackup tool lets a server that has already been compromised read bytes from pg_basebackup's memory through crafted backup manifest data. The leaked bytes are not sent back to the attacker, so an exploit would need additional implementation-specific knowledge to recover useful secrets.","audience":"businesses","category":"vendor","nicknames":[],"who_cares":["postgresql","pg_basebackup","database-backups"],"confidence":0.7,"fix_status":"available","needs_auth":"yes","worst_case":"Memory from the backup client is disclosed to an attacker who already controls the server","analyst_note":"","how_to_check":"- Check the installed version with `pg_basebackup --version`\n- Versions before `18.7`, `17.12`, `16.16`, `15.20` and `14.25` are affected","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["not-using-pg_basebackup","trusted-source-servers-only"],"who_is_affected":"Teams that run pg_basebackup to take backups from PostgreSQL servers, where the source server could be controlled by an attacker. The attacker must already have compromised the server being backed up. Teams that do not use pg_basebackup, or only back up trusted servers, are at lower risk.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"unknown","severity_if_unknown":"low"},"cost_usd":0.000752,"input_tokens":4643,"output_tokens":576,"severity_before":"low"},"analyst_status":null,"analyst_note":null,"search":"'-16240':13A,16A '-2026':12A,15A '14.25':156C '15.20':154C '16.16':153C '17.12':152C '18.7':151C 'achiev':96C 'addit':67B 'affect':158C 'allow':87C 'alreadi':37B,91C 'applic':142C 'attack':61B,89C,119C,125C 'back':58B,116C 'backup':19B,49B,103C 'basebackup':3A,21B,30B,44B,86C,100C 'byte':41B,54B,105C,115C 'client':9A 'compromis':39B,92C 'control':80C 'craft':48B 'cve':11A,14A 'data':51B 'databas':18B 'database-backup':17B 'disclosur':97C 'exploit':64B 'extern':79C 'externally-control':78C 'flaw':6A,25B 'format':4A,81C 'formatt':143C 'impact':136C 'implement':69B,130C 'implementation-specif':68B,129C 'improp':113C 'improperly-read':112C 'integr':135C 'knowledg':71B 'leak':8A,53B 'let':32B 'manifest':50B,104C 'memori':10A,46B,101C 'n':147C 'need':66B,127C 'particular':140C 'pg':2A,20B,29B,43B,85C,99C 'postgresql':1A,22B,27B,84C,150C 'read':40B,114C 'recov':73B 'return':110C 'secret':75B,132C 'sent':57B 'separ':128C 'server':34B,94C,121C 'specif':70B,131C 'string':5A,82C 'success':124C 'support':146C 'tool':31B 'unlik':138C 'use':74B,76C 'vendor':23B 'version':148C 'via':102C 'vulner':107C 'would':65B,126C","nicknames":[],"mitigations":[],"who_affected":"Teams that run pg_basebackup to take backups from PostgreSQL servers, where the source server could be controlled by an attacker. The attacker must already have compromised the server being backed up. Teams that do not use pg_basebackup, or only back up trusted servers, are at lower risk.","tier":"C","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"businesses","plain_action":null,"pkeys":[],"ptokens":[],"labels":["databasebackups","low","pgbasebackup","postgresql","vendor"],"campaign_type":null,"search_a":"'-16240':13A,16A '-2026':12A,15A 'basebackup':3A 'client':9A 'cve':11A,14A 'flaw':6A 'format':4A 'leak':8A 'memori':10A 'pg':2A 'postgresql':1A 'string':5A","search_b":"'addit':67B 'alreadi':37B 'attack':61B 'back':58B 'backup':19B,49B 'basebackup':21B,30B,44B 'byte':41B,54B 'compromis':39B 'craft':48B 'data':51B 'databas':18B 'database-backup':17B 'exploit':64B 'flaw':25B 'implement':69B 'implementation-specif':68B 'knowledg':71B 'leak':53B 'let':32B 'manifest':50B 'memori':46B 'need':66B 'pg':20B,29B,43B 'postgresql':22B,27B 'read':40B 'recov':73B 'secret':75B 'sent':57B 'server':34B 'specif':70B 'tool':31B 'use':74B 'vendor':23B 'would':65B","search_c":"'14.25':156C '15.20':154C '16.16':153C '17.12':152C '18.7':151C 'achiev':96C 'affect':158C 'allow':87C 'alreadi':91C 'applic':142C 'attack':89C,119C,125C 'back':116C 'backup':103C 'basebackup':86C,100C 'byte':105C,115C 'compromis':92C 'control':80C 'disclosur':97C 'extern':79C 'externally-control':78C 'format':81C 'formatt':143C 'impact':136C 'implement':130C 'implementation-specif':129C 'improp':113C 'improperly-read':112C 'integr':135C 'manifest':104C 'memori':101C 'n':147C 'need':127C 'particular':140C 'pg':85C,99C 'postgresql':84C,150C 'read':114C 'return':110C 'secret':132C 'separ':128C 'server':94C,121C 'specif':131C 'string':82C 'success':124C 'support':146C 'unlik':138C 'use':76C 'version':148C 'via':102C 'vulner':107C 'would':126C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-11-12T15:17:50+00:00","kev":null,"cvss_vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:L/I:N/A:N","cvss_by":"f86ef6dc-4d3a-42ad-8f28-e6d5547a5007","poc_count":0,"sources":[{"source":"nvd","external_id":"CVE-2026-16240","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-16240","severity":null,"published_at":"2026-11-12T15:17:50+00:00","modified_at":"2026-11-12T15:17:50+00:00","first_seen_at":"2026-11-12T15:41:57+00:00","fetched_at":"2026-11-12T15:41:57+00:00","note":null}],"documents":[],"disclosures":[],"exploit_sources":[],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}