# CVE-2018-19422: Subrion CMS RCE Vulnerability

> Remote attackers can execute arbitrary PHP code by uploading .pht or .phar files due to missing restrictions in the .htaccess configuration.

- **Severity:** High 7.2 (`CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 21 Nov 2018
- **Updated:** 5 Aug 2024
- **Also known as:** GHSA-73xj-v6gc-g5p5

## What is CVE-2018-19422?

CVE-2018-19422 is a high-severity vulnerability in n/a, published on 21 Nov 2018. An attacker needs administrator access to exploit it, with no action from the victim.

### Official description

/panel/uploads in Subrion CMS 4.2.1 allows remote attackers to execute arbitrary PHP code via a .pht or .phar file, because the .htaccess file omits these.

Weakness: CWE-434 (Unrestricted Upload of File with Dangerous Type)

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

2 open source packages ship an affected version, including intelliants/subrion. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `intelliants/subrion` | Packagist | All versions | 4.2.2 |
| `intelliants/subrion` | Packagist | All versions | 4.2.2 |

Products: Intelliants Subrion Cms.

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

Upgrade intelliants/subrion to 4.2.2 or later.

## Is CVE-2018-19422 being exploited?

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

Public exploit code:

- CVE-2018-19422 Authenticated Remote Code Execution (github_poc): https://github.com/hev0x/CVE-2018-19422-SubrionCMS-RCE
- This is an edited version of the CVE-2018-19422 exploit to fix an small but annoying issue I had. (github_poc): https://github.com/Swammers8/SubrionCMS-4.2.1-File-upload-RCE-auth-
- Intelliants Subrion CMS 4.2.1 - Authenticated File Upload Bypass to RCE (metasploit)
- Subrion CMS 4.2.1 - Arbitrary File Upload (exploitdb)
- Subrion File Upload Bypass to RCE and Custom File Upload (Authenticated) POC (github_poc): https://github.com/Drew-Alleman/CVE-2018-19422

## Other vulnerabilities in n/a

- [CVE-2017-11444](https://insights.sbomify.com/CVE-2017-11444/): SQL injection in n/a (critical 9.8)
- [CVE-2017-11445](https://insights.sbomify.com/CVE-2017-11445/): SQL injection in n/a (critical 9.8)
- [CVE-2017-6013](https://insights.sbomify.com/CVE-2017-6013/): SQL injection in n/a (critical 9.8)
- [CVE-2021-43464](https://insights.sbomify.com/CVE-2021-43464/): Remote code execution in Subrion (high 8.8)
- [CVE-2020-18326](https://insights.sbomify.com/CVE-2020-18326/): Cross Site Request Forgery in intelliants/subrion (high 8.8)

## Fix prompt for AI coding agents

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

What it is: CVE-2018-19422 is a high-severity vulnerability in n/a, published on 21 Nov 2018. An attacker needs administrator access to exploit it, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2018-19422 exists.

Affected packages and fixed versions:
- intelliants/subrion (Packagist): affected all versions; fixed in 4.2.2
- intelliants/subrion (Packagist): affected all versions; fixed in 4.2.2

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-19422/ (Markdown: https://insights.sbomify.com/CVE-2018-19422/index.md)
```

## Sources

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

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