/

CVE-2026-126463

Severity:

HIGH RISK

(7.1)

SQL Injection (CWE-89) in OpenEMR Clinical Data Forms

CVE-2026-126463

Analyzed

Vulnerability type

Category:

SQL Injection

CWE:

CWE-89

Impact:

Sensitive data disclosure and unauthorized modification of patient records

Severity:

HIGH RISK

(7.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 versions before 8.5.0 contain SQL injection vulnerabilities in several ERA and form-handling inputs, including POST key names. An authenticated user may exploit these paths to read sensitive account and patient information or alter patient data when input is incorporated into database queries unsafely.

Affected context

The reported issues affect OpenEMR before 8.5.0 in handling ERA CLP01, form_facility, form_icd_codes, and POST key names. Risk depends on these inputs reaching database operations without safe query construction and on an authenticated user being able to submit requests that exercise the affected paths.

Exploit preconditions

  • Attack surface: Application request handling for ERA and form-related inputs, including POST key names
  • Required access: An authenticated account able to reach the affected functionality
  • Trigger point: Processing of the affected input values or request keys in database operations
  • Why exploitation is possible: If request-controlled data is incorporated into SQL statements rather than handled as data, it may change query behavior

Why this happens

The vulnerability class is SQL injection, mapped to CWE-89. The underlying insecure pattern is constructing or executing SQL in a way that allows request-controlled values or keys to affect query syntax. Parameterized queries keep input separate from SQL instructions and help prevent this class of flaw.

Potential impact

  • Attackers may be able to retrieve password hashes from users_secure
  • Patient protected health information could be disclosed
  • Patient data fields could be overwritten
  • Unauthorized changes could affect the integrity of clinical records

General mitigation guidance

Common defensive patterns include:

  • Use parameterized queries or prepared statements for all database operations
  • Avoid building SQL from request values or request key names
  • Validate inputs against narrowly defined schemas and allowlists, while treating validation as complementary to parameterization
  • Limit database-account privileges to the minimum required for each operation
  • Restrict access to sensitive application functions and data according to user role
  • Apply consistent query-safety requirements through shared data-access layers

How teams detect issues like this

  • Use static analysis to identify SQL assembled through string concatenation or interpolation, especially where request data or key names are involved
  • Review database calls in ERA and form-processing paths for parameter binding and safe handling of dynamic identifiers
  • Enforce code-review and CI policies that require parameterized queries
  • Monitor for unusual database errors, unexpected query patterns, and abnormal access to sensitive account or patient data

Sources

SourceLink
github.comgithub.com/openemr/openemr/security/advisories/GHSA-g7m7-pc2p-7h7q
vulncheck.comvulncheck.com/advisories/openemr-before-8.5.0-sql-injection-via-billing-parser-reports-zend-modules

Frequently asked

questions

The reported attack paths require authentication and access to the affected ERA or form-handling functionality.

Successful exploitation may expose password hashes and patient PHI, and may allow patient data fields to be overwritten.

Use parameterized queries so request-controlled values are handled as data rather than SQL syntax. Avoid constructing query syntax from user-controlled input.

Apply parameterized-query requirements across data-access code, review dynamic query construction, limit database privileges, and include SQL injection checks in development and CI workflows.

Find out what's already
exploitable in your codebase.