---
id: "CVE-2026-76012"
kind: "vulnerability"
aliases: ["CVE-2026-76012"]
title: "NextGEN Gallery WordPress plugin: authenticated users can run code on server"
severity: "high"
cvss: 7.5
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["nextgen-gallery", "package", "self-hosted", "wordpress"]
not_affected_if: ["plugin-above-4.4.1", "plugin-not-installed"]
published_at: "2026-10-30T18:18:12+00:00"
first_seen_at: "2026-10-30T18:55:30+00:00"
updated_at: "2026-10-30T18:56:43+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-76012", "first_seen_at": "2026-10-30T18:55:30+00:00"}]
---

# NextGEN Gallery WordPress plugin: authenticated users can run code on server

The NextGEN Gallery WordPress plugin up to and including 4.4.1 has a flaw in its Lightroom gallery endpoint that lets a logged-in user upload a file into a template directory and have it executed. An attacker with custom-level access or higher who is the author of an existing gallery can run code on the server.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed NextGEN Gallery plugin version in the WordPress admin Plugins screen or `wp plugin get nextgen-gallery --field=version` against versions up to `4.4.1`
- Review user accounts with custom-level access or above and confirm who authored existing galleries

## Fix

- Move the NextGEN Gallery plugin to a version later than `4.4.1` (the fixed version is not stated in the sources)

## Timeline

- 2026-10-30T18:55:30+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-76012

## From the sources

The Photo Gallery, Sliders, Proofing and Themes – NextGEN Gallery plugin for WordPress is vulnerable to Remote Code Execution in all versions up to, and including, 4.4.1 via the legacy_render function. This is due to broken authorization on the Lightroom gallery_edit endpoint combined with mass assignment of gallery path and unrestricted file upload into a registered template directory, whose extension check uses a substring match that accepts sanitized .php_ filenames as valid templates. This makes it possible for authenticated attackers, with custom-level access and above, to execute code on the server. Exploitation requires the authenticated attacker to be the stored author of at least one existing NextGEN gallery, as ownership of that gallery is the sole authorization check gating the mass-assignment and upload steps.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
