Microsoft Windows VBScript Engine Out-of-Bounds Write
CVE-2018-8174 is a high-severity out-of-bounds write vulnerability in Windows 7 from Microsoft, with a CVSS 3.1 base score of 7.5 out of 10. It can be exploited remotely over the network by an unauthenticated attacker, but only if a user takes part, for example by opening a link or file. Affected Windows 7 versions: 32-bit Systems Service Pack 1; x64-based Systems Service Pack 1. The record does not name a fixed version, so check the vendor advisory. CISA added it to the Known Exploited Vulnerabilities catalogue on February 15, 2022, which means attacks have been observed in the wild, including in ransomware campaigns.
Attackers are already exploiting this vulnerability, according to CISA.
What to do
- Check which version of Windows 7 you run against the affected versions below, and install the vendor's latest release.
- CISA's required action: Apply updates per vendor instructions.
- Read the advisory on portal.msrc.microsoft.com for workarounds and exact fixed builds.
- Until you can update, restrict network access to the affected service so it is not reachable from untrusted networks.
- Because the attack needs a user to take part, warn users about unexpected links and files related to this product until it is patched.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Microsoft | Windows 7 | 32-bit Systems Service Pack 1; x64-based Systems Service Pack 1 | Not stated |
| Microsoft | Windows Server 2012 R2 | (Server Core installation) | Not stated |
| Microsoft | Windows RT 8.1 | Windows RT 8.1 | Not stated |
| Microsoft | Windows Server 2008 | 32-bit Systems Service Pack 2; 32-bit Systems Service Pack 2 (Server Core installation); Itanium-Based Systems Service Pack 2; x64-based Systems Service Pack 2; x64-based Systems Service Pack 2 (Server Core installation) | Not stated |
| Microsoft | Windows Server 2012 | (Server Core installation) | Not stated |
| Microsoft | Windows 8.1 | 32-bit systems; x64-based systems | Not stated |
| Microsoft | Windows Server 2016 | (Server Core installation) | Not stated |
| Microsoft | Windows Server 2008 R2 | Itanium-Based Systems Service Pack 1; x64-based Systems Service Pack 1; x64-based Systems Service Pack 1 (Server Core installation) | Not stated |
| Microsoft | Windows 10 | 32-bit Systems; Version 1607 for 32-bit Systems; Version 1607 for x64-based Systems; Version 1703 for 32-bit Systems; Version 1703 for x64-based Systems; Version 1709 for 32-bit Systems; Version 1709 for x64-based Systems; Version 1803 for 32-bit Systems; and 2 more ranges | Not stated |
| Microsoft | Windows 10 Servers | version 1709 (Server Core Installation); version 1803 (Server Core Installation) | Not stated |
| Microsoft | Windows 10 1607 | Not specified in the record | Not stated |
| Microsoft | Windows 10 1703 | Not specified in the record | Not stated |
| Microsoft | Windows 10 1709 | Not specified in the record | Not stated |
| Microsoft | Windows 10 1803 | Not specified in the record | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- HighSuccess depends on conditions outside the attacker's control.
- Privileges required
- NoneNo account or login is needed.
- User interaction
- RequiredA user must take an action such as opening a file or link.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:H. Scored by NVD.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.5 | High | NVD |
| CVSS 3.1 | 7.5 | High | CISA (ADP) |
| CVSS 2.0 | 7.6 | High | NVD |
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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Out-of-bounds Write
The product writes data past the end, or before the beginning, of the intended buffer.
How developers prevent this class of flaw
- Use a language that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. For example, many languages that perform their own memory management, such as Java and Perl, are not subject to buffer overflows. Other languages, such as Ada and C#, typically provide overflow protection, but the protection can be disabled by the programmer. Be wary that a language's interface to native code may still be subject to overflows, even if the language itself is theoretically safe.
- Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid. Examples include the Safe C String Library (SafeStr) by Messier and Viega, and the Strsafe.h library from Microsoft. These libraries provide safer versions of overflow-prone string-handling functions.
- Use automatic buffer overflow detection mechanisms that are offered by certain compilers or compiler extensions. Examples include: the Microsoft Visual Studio /GS flag, Fedora/Red Hat FORTIFY_SOURCE GCC flag, StackGuard, and ProPolice, which provide various mechanisms including canary-based detection and range/index checking. D3-SFCV (Stack Frame Canary Validation) from D3FEND discusses canary-based detection in detail.
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: active, automatable: no, technical impact: total).
- Added to CISA's Known Exploited Vulnerabilities catalogue.
- Deadline for US federal agencies to remediate, set by CISA.
- Record last changed materially (score, affected products, status or references).
References
Third-party and government advisories
- securityfocus.com/bid/103998Third Party Advisory, VDB Entry
- cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2018-8174US Government Resource
Technical write-ups (may include proof of concept)
- blog.0patch.com/2018/05/a-single-instruction-micropatch-for.htmlExploit, Technical Description, Third Party Advisory
- exploit-db.com/exploits/44741/Exploit, Third Party Advisory, VDB Entry
Recent Out-of-bounds Write vulnerabilities
- 8.6 High severity
- 9.8 Critical severity
- 7.8 High severity
Microsoft Office Memory Corruption Exploited
- 8.8 High severity
Microsoft Office Memory Corruption Exploited
- 7.8 High severity
- 8.8 High severity
Spotted an error? Tell us.