# CVE-2018-1999022: Code injection in n/a

> Attackers can execute arbitrary code, read data, or modify data via crafted query strings in the PEAR HTML_QuickForm library.

- **Severity:** Critical 9.8 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 23 Jul 2018
- **Updated:** 16 Sep 2024
- **Also known as:** CVE-2018-1000212, DEBIAN-CVE-2018-1999022, GHSA-ppg7-5cr7-7v24, MGASA-2019-0049, UBUNTU-CVE-2018-1999022

## What is CVE-2018-1999022?

CVE-2018-1999022 is a critical code injection vulnerability in n/a, published on 23 Jul 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

PEAR HTML_QuickForm version 3.2.14 contains an eval injection (CWE-95) vulnerability in HTML_QuickForm's getSubmitValue method, HTML_QuickForm's validate method, HTML_QuickForm_hierselect's _setOptions method, HTML_QuickForm_element's _findValue method, HTML_QuickForm_element's _prepareValue method. that can result in Possible information disclosure, possible impact on data integrity and execution of arbitrary code. This attack appear to be exploitable via A specially crafted query string could be utilised, e.g. http://www.example.com/admin/add_practice_type_id[1]=fubar%27])%20OR%20die(%27OOK!%27);%20//&mode=live. This vulnerability appears to have been fixed in 3.2.15.

Weakness: CWE-94 (Improper Control of Generation of Code)

## Which versions are affected by CVE-2018-1999022?

It affects 2 products.


Products: Civicrm Civicrm, Html Quickform Project Html Quickform.

## How do I fix CVE-2018-1999022?

Upgrade to a fixed version.

## Is CVE-2018-1999022 being exploited?

There is no known exploitation of CVE-2018-1999022 in the wild and no public exploit code.

## Other vulnerabilities in n/a

- [CVE-2020-36388](https://insights.sbomify.com/CVE-2020-36388/): File upload in n/a (high 8.8)
- [CVE-2013-5957](https://insights.sbomify.com/CVE-2013-5957/): SQL injection in n/a (high 7.5)
- [CVE-2013-4662](https://insights.sbomify.com/CVE-2013-4662/): CiviCRM SQL injection vulnerability via Quick Search API (medium 6.5)
- [CVE-2025-65187](https://insights.sbomify.com/CVE-2025-65187/): Cross-site scripting in n/a (medium 6.1)
- [CVE-2011-5239](https://insights.sbomify.com/CVE-2011-5239/): Weak cryptography in n/a (medium 5.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-1999022 and fix it if it is affected.

What it is: CVE-2018-1999022 is a critical code injection vulnerability in n/a, published on 23 Jul 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2018-1999022 in the wild and no public exploit code.

Affected product: n/a. 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-2018-1999022/ (Markdown: https://insights.sbomify.com/CVE-2018-1999022/index.md)
```

## Sources

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

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