# CVE-2014-5462: SQL injection in n/a

> Authenticated users can execute arbitrary SQL commands in OpenEMR via multiple parameters, allowing unauthorized access to or modification of medical data.

- **Severity:** Medium 6.5 (`AV:N/AC:L/Au:S/C:P/I:P/A:P`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 8 Dec 2014
- **Updated:** 6 Aug 2024
- **Also known as:** CVE-2018-1000220, GHSA-vr74-whc2-5mvm

## What is CVE-2014-5462?

CVE-2014-5462 is a medium-severity SQL injection vulnerability in Open-Emr Openemr, published on 8 Dec 2014. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

Multiple SQL injection vulnerabilities in OpenEMR 4.1.2 (Patch 7) and earlier allow remote authenticated users to execute arbitrary SQL commands via the (1) layout_id parameter to interface/super/edit_layout.php; (2) form_patient_id, (3) form_drug_name, or (4) form_lot_number parameter to interface/reports/prescriptions_report.php; (5) payment_id parameter to interface/billing/edit_payment.php; (6) id parameter to interface/forms_admin/forms_admin.php; (7) form_pid or (8) form_encounter parameter to interface/billing/sl_eob_search.php; (9) sortby parameter to interface/logview/logview.php; form_facility parameter to (10) procedure_stats.php, (11) pending_followup.php, or (12) pending_orders.php in interface/orders/; (13) patient, (14) encounterid, (15) formid, or (16) issue parameter to interface/patient_file/deleter.php; (17) search_term parameter to interface/patient_file/encounter/coding_popup.php; (18) text parameter to interface/patient_file/encounter/search_code.php; (19) form_addr1, (20) form_addr2, (21) form_attn, (22) form_country, (23) form_freeb_type, (24) form_partner, (25) form_name, (26) form_zip, (27) form_state, (28) form_city, or (29) form_cms_id parameter to interface/practice/ins_search.php; (30) form_pid parameter to interface/patient_file/problem_encounter.php; (31) patient, (32) form_provider, (33) form_apptstatus, or (34) form_facility parameter to interface/reports/appointments_report.php; (35) db_id parameter to interface/patient_file/summary/demographics_save.php; (36) p parameter to interface/fax/fax_dispatch_newpid.php; or (37) patient_id parameter to interface/patient_file/reminder/patient_reminders.php.

Weakness: CWE-89 (Improper Neutralization of Special Elements used in an SQL Command)

## Which versions are affected by CVE-2014-5462?

It affects 1 product.


Products: Open-Emr Openemr.

## How do I fix CVE-2014-5462?

No fix has been published for CVE-2014-5462 yet. Limit exposure of the affected software until one is available.

## Is CVE-2014-5462 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2014-5462 exists.

Public exploit code:

- OpenEMR 4.1.2(7) - Multiple SQL Injections (exploitdb)

## Other vulnerabilities in Open-Emr Openemr

- [CVE-2026-24898](https://insights.sbomify.com/CVE-2026-24898/): OpenEMR has an Unauthenticated MedEx Token Disclosure (critical 10.0)
- [CVE-2026-24849](https://insights.sbomify.com/CVE-2026-24849/): OpenEMR Arbitrary File Read Vulnerability (critical 10.0)
- [CVE-2026-24908](https://insights.sbomify.com/CVE-2026-24908/): OpenEMR has SQL Injection in Patient API Sort Parameter (critical 10.0)
- [CVE-2022-2734](https://insights.sbomify.com/CVE-2022-2734/): Improper Restriction of Rendered UI Layers or Frames in openemr/openemr (critical 10.0)
- [CVE-2024-22611](https://insights.sbomify.com/CVE-2024-22611/): SQL injection in n/a (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2014-5462 and fix it if it is affected.

What it is: CVE-2014-5462 is a medium-severity SQL injection vulnerability in Open-Emr Openemr, published on 8 Dec 2014. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2014-5462 exists.

Affected product: Open-Emr Openemr. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2014-5462/ (Markdown: https://insights.sbomify.com/CVE-2014-5462/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2014-5462
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2014-5462
- OSV: https://osv.dev/vulnerability/CVE-2014-5462

---
From sbomify Insights: https://insights.sbomify.com/CVE-2014-5462/
Summaries are generated and may contain mistakes; the official description above is the record.
