Public Vulnerability Reports

Multiple Vendor wvWare LVL Count Integer Overflow Vulnerability



The WV library provides an interface to facilitate access to binary file format Microsoft Word documents. The project was originally called "mswordview" but was renamed to avoid confusion. For more information, see


Remote exploitation of an integer overflow vulnerability in the WV library could allow an attacker to execute arbitrary code.

When parsing documents, an attacker supplied integer value is multiplied with a constant without checking for an overflow condition.

 35 int 36 wvGetLFO_records (LFO ** lfo, LFOLVL ** lfolvl, LVL ** lvl, U32 *nolfo, 37 U32 * nooflvl, U32 offset, U32 len, wvStream *fd) 38 { .. 47 for (i = 0; i < *nolfo; i++) 48 *nooflvl += (*lfo)[i].clfolvl; .. 59 *lfolvl = (lfolvl *) wvmalloc (sizeof (lfolvl) * *nooflvl); 60 *lvl = (lvl *) wvmalloc (sizeof (lvl) * *nooflvl); 
On lines 47 and 48, a loop of '*nolfo' iterations increments '*nooflvl' by an attacker supplied 8-bit value read from the file. Lines 59 and 60 will use the calculated value to allocate memory for two different dynamic structure arrays. Since no input validation is done, integer overflow can occur. If an integer overflow, or wrap-around, does occur it will lead to a heap overflow situation.


A remote attacker could execute arbitrary code as a user that uses a WV library dependent product to handle a malicious Microsoft Word document.


iDefense has confirmed that this vulnerability exists in version 1.2.2 of the WV library. Earlier versions are suspected to be vulnerable as well.


Users should avoid opening suspicious documents from untrusted sources.


The wvWare maintainers have addressed this vulnerability by releasing version 1.2.3.


The Common Vulnerabilities and Exposures (CVE) project has assigned the name CVE-2006-4513 to this issue. This is a candidate for inclusion in the CVE list (,which standardizes names for security problems.


08/17/2006 Initial vendor notification
10/18/2006 Initial vendor response
10/18/2006 Second vendor notification
10/26/2006 Coordinated public disclosure


This vulnerability was reported to iDefense by infamous41md.

Get paid for vulnerability research

Free tools, research and upcoming events


Copyright © 2006 Verisign, Inc.

Permission is granted for the redistribution of this alert electronically. It may not be edited in any way without the express written consent of iDefense. If you wish to reprint the whole or any part of this alert in any other medium other than electronically, please email for permission.

Disclaimer: The information in the advisory is believed to be accurate at the time of publishing based on currently available information. Use of the information constitutes acceptance for use in an AS IS condition. There are no warranties with regard to this information. Neither the author nor the publisher accepts any liability for any direct, indirect, or consequential loss or damage arising from use of, or reliance on, this information.