CVE-2018-16982: Open Chinese Convert Denial of Service via Out-of-bounds Read
Summary
CVE-2018-16982: Open Chinese Convert subject to Denial of Service via Out-of-bounds Read. Affects opencc versions < 1.1.2. Fixed in 1.1.2. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Open Chinese Convert (OpenCC) is an open-source library that provides conversion between Traditional Chinese and Simplified Chinese. It is commonly used in various applications and frameworks to facilitate Chinese text processing. However, OpenCC versions 0 to 1.1.2 are vulnerable to a Denial of Service (DoS) attack due to an out-of-bounds read issue in the BinaryDict::NewFromFile function in BinaryDict.cpp. This vulnerability can be exploited by an attacker through a crafted .ocd file, leading to a segmentation fault and causing the application to crash.
Vulnerability Detail
The vulnerability in OpenCC arises from the BinaryDict::NewFromFile function in BinaryDict.cpp, which fails to properly handle keyOffset and valueOffset values when parsing a .ocd file. By providing specially crafted values, an attacker can trigger an out-of-bounds read, leading to a segmentation fault and a denial of service condition. This vulnerability has a CVSS score of 5.5, indicating a moderate severity level. Exploitation of this vulnerability can result in application crashes and potential disruption of services relying on OpenCC.
How To Fix
Latest published version: 1.4.2 as of 23 Oct 2026
npm install opencc@1.4.2
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
1.1.2
This is the first release that contains the fix.
npm install opencc@1.1.2
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
There is no known workaround for this vulnerability. It is essential to update OpenCC to the patched version to mitigate the risk of exploitation.
Conclusion
Open Chinese Convert (OpenCC) versions 0 to 1.1.2 are vulnerable to a Denial of Service (DoS) attack due to an out-of-bounds read issue. To mitigate this vulnerability, users should update OpenCC to version 1.1.2 or later. It is crucial to keep software dependencies up to date to ensure the security and stability of applications. For further assistance or support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for opencc →
FAQ
Open Chinese Convert (OpenCC) is an open-source library that provides conversion between Traditional Chinese and Simplified Chinese. It is widely used in various applications and frameworks for Chinese text processing.
This vulnerability can be exploited by an attacker to cause a denial of service (DoS) condition by crashing the application using OpenCC. It can potentially disrupt services relying on OpenCC functionality.
To fix this vulnerability, it is recommended to update OpenCC to version 1.1.2 or later. This version includes a fix for the out-of-bounds read issue in BinaryDict::NewFromFile. Users should update OpenCC using the package manager for their specific ecosystem (npm or PyPI).
There is no known workaround for this vulnerability. It is crucial to update OpenCC to the patched version to mitigate the risk of exploitation.
This vulnerability has a CVSS score of 5.5, indicating a moderate severity level. While it can lead to a denial of service condition, it does not allow for arbitrary code execution or privilege escalation.
References
Related vulnerabilities
Recent vulnerabilities recorded for opencc.