# CVE-2018-8174: Microsoft Windows VBScript Engine Out-of-Bounds Write

> Remote code execution via memory corruption in the Windows VBScript engine allows attackers to execute arbitrary code.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Yes, since 15 Feb 2022 (CISA KEV), used in ransomware
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** No
- **Published:** 9 May 2018
- **Updated:** 13 Aug 2026
- **Also known as:** GHSA-5cv8-848m-hmm2

## What is CVE-2018-8174?

CVE-2018-8174 is a high-severity memory corruption vulnerability in Microsoft Windows 10 1607, published on 9 May 2018. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

A remote code execution vulnerability exists in the way that the VBScript engine handles objects in memory, aka "Windows VBScript Engine Remote Code Execution Vulnerability." This affects Windows 7, Windows Server 2012 R2, Windows RT 8.1, Windows Server 2008, Windows Server 2012, Windows 8.1, Windows Server 2016, Windows Server 2008 R2, Windows 10, Windows 10 Servers.

Weakness: CWE-787 (Out-of-bounds Write)

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

It affects 10 products.


Products: Microsoft Windows 10 1607, Microsoft Windows 10 1703, Microsoft Windows 10 1709, Microsoft Windows 10 1803, Microsoft Windows 7, Microsoft Windows 8.1, Microsoft Windows Rt 8.1, Microsoft Windows Server 2008, Microsoft Windows Server 2012, Microsoft Windows Server 2016.

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

No fix has been published for CVE-2018-8174 yet. Limit exposure of the affected software until one is available. US federal agencies must fix it by 15 Aug 2022.

## Is CVE-2018-8174 being exploited?

Yes. Attackers have exploited CVE-2018-8174 in the wild since at least 15 Feb 2022, including in ransomware campaigns.

Public exploit code:

- CVE-2018-8174 - VBScript memory corruption exploit. (github_poc): https://github.com/0x09AL/CVE-2018-8174-msf
- CVE-2018-8174_python (github_poc): https://github.com/Yt1g3r/CVE-2018-8174_EXP
- Analysis of VBS exploit CVE-2018-8174 (github_poc): https://github.com/piotrflorczyk/cve-2018-8174_analysis
- Exploit Generator for CVE-2018-8174 & CVE-2019-0768 (RCE via VBScript Execution in IE11) (github_poc): https://github.com/ruthlezs/ie11_vbscript_exploit
- MS Word MS WordPad via IE VBS Engine RCE  (github_poc): https://github.com/SyFi/CVE-2018-8174
- Microsoft Internet Explorer 11 (Windows 7 x86/x64) - vbscript Code Execution (exploitdb)

## Other vulnerabilities in Microsoft Windows 10 1607

- [CVE-2026-33824](https://insights.sbomify.com/CVE-2026-33824/): Microsoft Internet Key Exchange (IKE) Service Extensions Double Free (critical 9.8, exploited in the wild)
- [CVE-2026-21510](https://insights.sbomify.com/CVE-2026-21510/): Microsoft Windows Shell Protection Mechanism Failure (high 8.8, exploited in the wild)
- [CVE-2026-21513](https://insights.sbomify.com/CVE-2026-21513/): Microsoft MSHTML Framework Protection Mechanism Failure (high 8.8, exploited in the wild)
- [CVE-2023-32049](https://insights.sbomify.com/CVE-2023-32049/): Microsoft Windows Defender SmartScreen Security Feature Bypass (high 8.8, exploited in the wild)
- [CVE-2023-29360](https://insights.sbomify.com/CVE-2023-29360/): Microsoft Streaming Service Untrusted Pointer Dereference (high 8.4, exploited in the wild)

## Fix prompt for AI coding agents

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

What it is: CVE-2018-8174 is a high-severity memory corruption vulnerability in Microsoft Windows 10 1607, published on 9 May 2018. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: Yes. Attackers have exploited CVE-2018-8174 in the wild since at least 15 Feb 2022, including in ransomware campaigns.

Affected product: Microsoft Windows 10 1607. 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-8174/ (Markdown: https://insights.sbomify.com/CVE-2018-8174/index.md)
```

## Sources

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

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