CVE-2007-2666 in Notepad++ and 1 more product
Stack-based buffer overflow in LexRuby.cxx (SciLexer.dll) in Scintilla 1.73, as used by notepad++ 4.1.1 and earlier, allows user-assisted remote attackers to execute arbitrary code via certain Ruby (.rb) files with long lines. NOTE: this was originally reported as a vulnerability in notepad++.
Affects 2 products from 2 vendors. Facts below cite their sources.
Remotely exploitable over the network, high complexity.
Affected products and versions
A product listed here is affected only at the versions shown. Use the free check to test the exact version you run.
Fix and vendor advisory
No official vendor advisory link on record. See the CVE record.
Exploitation
| CISA known-exploited | Not in the CISA KEV catalog |
|---|---|
| Public exploit | Reported · reference |
Official description
Stack-based buffer overflow in LexRuby.cxx (SciLexer.dll) in Scintilla 1.73, as used by notepad++ 4.1.1 and earlier, allows user-assisted remote attackers to execute arbitrary code via certain Ruby (.rb) files with long lines. NOTE: this was originally reported as a vulnerability in notepad++.
Source: NIST NVD / MITRE CVE.
Record details
| CVE ID | CVE-2007-2666 |
|---|---|
| BreachSpider ID | BS-2007-GLOBAL-173008-H |
| CVSS vector | AV:N/AC:H/Au:N/C:C/I:C/A:C |
| Published | 2007-05-14 |
| Last modified | 2026-06-16 |
| Weakness (CWE) | |
| Source | NVD |
Weakness definitions
CWE-119: Improper Restriction of Operations within Memory Buffer
Parent class for buffer-related vulnerabilities where operations exceed buffer boundaries.
Related attack patterns (CAPEC)
CAPEC-8 Buffer Overflow in an API Call via CWE-119
CAPEC-9 Buffer Overflow in Local Command-Line Utilities via CWE-119
CAPEC-10 Buffer Overflow via Environment Variables via CWE-119
CAPEC-14 Client-side Injection-induced Buffer Overflow via CWE-119
CAPEC-24 Filter Failure through Buffer Overflow via CWE-119
Show all 12
CAPEC-42 MIME Conversion via CWE-119
CAPEC-44 Overflow Binary Resource File via CWE-119
CAPEC-45 Buffer Overflow via Symbolic Links via CWE-119
CAPEC-46 Overflow Variables and Tags via CWE-119
CAPEC-47 Buffer Overflow via Parameter Expansion via CWE-119
CAPEC-100 Overflow Buffers via CWE-119
CAPEC-123 Buffer Manipulation via CWE-119
Mapping is CWE to CAPEC per MITRE CAPEC 3.9.
Analysis AI-written, not human-reviewed
A stack-based buffer overflow exists in the LexRuby.cxx component of Scintilla 1.73, which is used by notepad++ versions 4.1.1 and earlier. This vulnerability can be exploited by remote attackers to execute arbitrary code through specially crafted Ruby (.rb) files with long lines. The CVSS score is 7.6, indicating a high severity level, but the exploitation likelihood is low due to the complexity of the attack vector and the lack of public proof-of-concept (PoC).
The vulnerability is triggered when a user opens a maliciously crafted Ruby (.rb) file with long lines in notepad++. The long lines cause a stack-based buffer overflow in the LexRuby.cxx component of Scintilla, leading to potential arbitrary code execution. The attacker needs to trick the user into opening the malicious file, which adds a layer of complexity to the attack vector.
Compensating controls AI-drafted, review before use
Implement file type and size restrictions on file uploads to prevent the execution of large Ruby (.rb) files. Use application whitelisting to restrict the execution of unauthorized applications. Regularly update notepad++ to the latest version to mitigate known vulnerabilities.
NERC CIP: CIP-007 CIP-007-R2
IEC 62443: SR 7.6
Not validated for your network. A compensating control does not replace the vendor fix.
Questions
What is CVE-2007-2666?
A stack-based buffer overflow exists in the LexRuby.cxx component of Scintilla 1.73, which is used by notepad++ versions 4.1.1 and earlier. This vulnerability can be exploited by remote attackers to execute arbitrary code through specially crafted Ruby (.rb) files with long lines. The CVSS score is 7.6, indicating a high severity level, but the exploitation likelihood is low due to the complexity of the attack vector and the lack of public proof-of-concept (PoC).
What is the CVSS score for CVE-2007-2666?
CVE-2007-2666 has CVSS 7.6 (High). Vector: AV:N/AC:H/Au:N/C:C/I:C/A:C. EPSS: 15.5%.
Is CVE-2007-2666 actively exploited?
Public exploit available for CVE-2007-2666. Exploitation risk elevated.
How do I remediate CVE-2007-2666?
Priority: MEDIUM.
What systems are affected by CVE-2007-2666?
CVE-2007-2666 affects Notepad++ Notepad++; Scintilla Scintilla.
What NERC-CIP standard applies to CVE-2007-2666?
NERC CIP CIP-007 CIP-007-R2: This CVE could allow an attacker to execute arbitrary code on a critical system, violating the requirement to protect against unauthorized access to electronic security perimeters.
What IEC 62443 requirement maps to CVE-2007-2666?
IEC 62443 SR 7.6: This vulnerability affects the integrity and availability of the system, which is a key concern under the IEC 62443 standard for industrial control systems.
For developers and AI agents
Run this check from your own code or agent
REST API
curl -s https://breachspider.com/api/v1/assets/correlate-cves \
-H "Authorization: Bearer $BREACHSPIDER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"assets":[{"asset_id":"dev-1","vendor":"Notepad++","product":"Notepad++","version":"1.0"}]}'
MCP for AI agents
# hosted: add as a connector
https://mcp.breachspider.com/mcp
# local
pipx install breachspider-mcp
Free trial: 14 days, 750 device checks, no card.
Page facts from NVD, MITRE, CISA and vendor advisories, record last modified 2026-06-16.