Vulnerabilities / Code Snippets / WPSEC-2026-2643
Code Snippets <= 4.0.0 - Authenticated (Contributor+) Sensitive Information Exposure via Snippet Source Shortcodes
Medium 4.3
CWE-200Fixed in 4.1.0
- ID
- WPSEC-2026-2643
- Plugin
- Code Snippets (code-snippets)
- Affected
- from 2.6.0 before 4.1.0
- Remediation
- Update to 4.1.0 or later.
- CVSS 3.1
- CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N
- Weakness
- CWE-200
- Usage
- Plugin Medium · Affected versions Medium among sites WPSec scans, 2026-11-06
- Attack surface
- Code Snippets on WPSec AttackSurface
- Fix released
- Published
Description
The Code Snippets plugin for WordPress is vulnerable to Sensitive Information Exposure via the [code_snippet_source] and [code_snippet] shortcodes in all versions up to, and including, 4.0.0, due to the shortcodes rendering the source code of any snippet by ID without checking whether the author of the post is allowed to manage snippets. This makes it possible for authenticated attackers with contributor-level access and above to read the source code of any site or network snippet, which may contain sensitive data such as credentials or API keys.
References
- https://wpsec.com/vuln/WPSEC-2026-2643/
- https://plugins.svn.wordpress.org/code-snippets/tags/4.1.0/
- https://wordpress.org/plugins/code-snippets/
Published by WPSec. Provided as is, without warranty. Corrections: contact us.
This advisory as JSON or Markdown · All advisories: JSON, RSS