/

CVE-2026-126430

Severity:

HIGH RISK

(8.1)

SQL Injection (CWE-89) in OpenEMR CCR Approval Controller

CVE-2026-126430

Modified

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Sensitive data disclosure, data tampering, and patient-portal account takeover

Severity:

HIGH RISK

(8.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

OpenEMR's CCR revandapprove controller can allow an authenticated core user to inject SQL by supplying crafted patient_data field names. Depending on the database permissions and affected data, this may expose sensitive values, alter patient records, or enable patient-portal account takeover.

Affected context

The issue is in the CCR revandapprove controller's handling of patient_data field names when constructing an UPDATE statement. OpenEMR deployments are at risk when this controller accepts those names from authenticated core users and uses them in SQL without safely constraining or binding them.

Exploit preconditions

  • Attack surface: The CCR revandapprove controller and its patient-data update path
  • Required access: Authentication as a core user
  • Trigger point: A request that causes the controller to build an UPDATE using supplied patient_data field names
  • Why exploitation is possible: Untrusted field names can influence SQL structure, allowing injected SQL expressions to be evaluated as part of the update

Why this happens

The controller allows user-influenced field names to affect the structure of an SQL UPDATE statement. SQL parameters can safely bind values, but identifiers such as column names generally require separate validation against a strict allowlist. Failing to constrain these identifiers can permit SQL injection, mapping to CWE-89: Improper Neutralization of Special Elements used in an SQL Command.

Potential impact

  • Attackers may read sensitive database values, including staff password hashes and portal reset values.
  • Patient demographic records could be altered.
  • Patient-portal accounts could be taken over.
  • Exposure or modification of related records may occur depending on database permissions and application behavior.

General mitigation guidance

Defensive patterns focus on keeping user input from controlling SQL structure:

  • Use parameterized queries for data values.
  • Validate any dynamic identifiers against a fixed allowlist of permitted fields.
  • Avoid constructing SQL statements directly from request-supplied names.
  • Apply least-privilege permissions to database accounts and application roles.
  • Limit access to sensitive patient and account data, and audit changes to those records.

How teams detect issues like this

  • Use static analysis to identify SQL built through concatenation or interpolation of request-controlled identifiers.
  • Review controller code paths that accept field names or other inputs used to construct SQL structure.
  • Enforce code-review and CI policies requiring parameterized queries and allowlisted identifiers for dynamic SQL.
  • Monitor for unusual database reads, changes to patient demographics, and unexpected portal-account recovery activity.

Sources

SourceLink
github.comgithub.com/openemr/openemr/security/advisories/GHSA-wh28-4qcg-5hcc
vulncheck.comvulncheck.com/advisories/openemr-before-8.5.0-sql-injection-via-ccr-revandapprove-field-names

Frequently asked

questions

The described attack requires authentication as a core user; it is not described as an unauthenticated vulnerability.

An attacker needs access to a core-user account and a path to submit patient_data field names to the CCR revandapprove controller.

Bind data values with parameterized queries and restrict dynamic column names to a strict allowlist.

Avoid building SQL structure from request data, review dynamic-query code paths, and enforce secure query patterns through static analysis and code-review policies.

Find out what's already
exploitable in your codebase.