Search for packages
| purl | pkg:npm/opencc@1.1.0 |
| Vulnerability | Summary | Fixed by |
|---|---|---|
|
VCID-e73b-ezcp-h3h6
Aliases: GHSA-7fqq-q52p-2jjg |
OpenCC has an Out-of-bounds read when processing truncated UTF-8 input ### Summary OpenCC versions before 1.2.0 contain two `CWE-125: Out-of-bounds Read` issues caused by length validation failures in UTF-8 processing. When handling malformed or truncated UTF-8 input, OpenCC trusted derived length values without enforcing the invariant that processed length must not exceed the remaining input buffer. This could result in out-of-bounds reads during segmentation or conversion. ### Details Two independent code paths in OpenCC failed to enforce the invariant: `matchedLength <= remainingLength` Both paths assumed derived length values were valid and within input bounds, but did not validate that assumption against the remaining buffer. This created the following failure chain: `invalid UTF-8 -> incorrect derived length -> incorrect pointer advance -> remaining-length desynchronization -> out-of-bounds read` In `MaxMatchSegmentation::Segment`, this could desynchronize remaining-length tracking and cause out-of-bounds reads during prefix matching. In `Conversion::Convert(const char*)`, similar logic could advance processing past the end of the input string and read beyond the null terminator into adjacent memory. In some cases, unintended heap bytes could be propagated into the conversion result. PR #1005 fixes both issues by explicitly tracking input boundaries, recomputing remaining length on each iteration, and clamping processed lengths so the buffer-bound invariant is preserved. Affected versions: * All versions before 1.2.0 Patched version: * 1.2.0 ### PoC Build a vulnerable version with AddressSanitizer enabled and process input ending with a truncated UTF-8 sequence, such as a missing final byte of a 3-byte character. The original report and ASan reproduction are available in [Issue #997](https://github.com/BYVoid/OpenCC/issues/997). ### Impact This vulnerability may cause process crashes and limited, non-deterministic information disclosure when OpenCC processes malformed or attacker-controlled UTF-8 input. The issue does not indicate arbitrary write or code execution. OpenCC is distributed through system and language-specific package managers, prebuilt binaries, container images, and downstream software, so affected versions may be present even when it is not listed as a direct dependency. Users should upgrade all installed or bundled copies of OpenCC to 1.2.0 or later. ### Credit OpenCC thanks @oneafter for reporting the issue. |
Affected by 0 other vulnerabilities. |
|
VCID-ua4v-kne1-suas
Aliases: CVE-2018-16982 GHSA-9qh2-6fxg-9m4g PYSEC-2018-153 |
Open Chinese Convert (OpenCC) 1.0.5 allows attackers to cause a denial of service (segmentation fault) because BinaryDict::NewFromFile in BinaryDict.cpp may have out-of-bounds keyOffset and valueOffset values via a crafted .ocd file. |
Affected by 2 other vulnerabilities. |
|
VCID-zgp3-385c-mybk
Aliases: CVE-2025-15536 GHSA-5pr6-crvp-2j9f |
Open Chinese Convert has Out-of-bounds Write A weakness has been identified in BYVoid OpenCC up to 1.1.9. This vulnerability affects the function opencc::MaxMatchSegmentation of the file src/MaxMatchSegmentation.cpp. This manipulation causes heap-based buffer overflow. The attack is restricted to local execution. The exploit has been made available to the public and could be used for attacks. Patch name: 345c9a50ab07018f1b4439776bad78a0d40778ec. To fix this issue, it is recommended to deploy a patch. |
Affected by 0 other vulnerabilities. |
| Vulnerability | Summary | Aliases |
|---|---|---|
| This package is not known to fix vulnerabilities. | ||
| Date | Actor | Action | Vulnerability | Source | VulnerableCode Version |
|---|---|---|---|---|---|
| 2026-06-06T07:38:46.548040+00:00 | GitLab Importer | Affected by | VCID-e73b-ezcp-h3h6 | https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/opencc/GHSA-7fqq-q52p-2jjg.yml | 38.6.0 |
| 2026-06-06T06:41:27.407028+00:00 | GitLab Importer | Affected by | VCID-zgp3-385c-mybk | https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/opencc/CVE-2025-15536.yml | 38.6.0 |
| 2026-06-06T02:00:13.913015+00:00 | GitLab Importer | Affected by | VCID-ua4v-kne1-suas | https://gitlab.com/gitlab-org/advisories-community/-/blob/main/npm/opencc/CVE-2018-16982.yml | 38.6.0 |