Wiz Agents & Workflows are here
Vulnerability DatabaseGHSA-7fqq-q52p-2jjg

GHSA-7fqq-q52p-2jjg
JavaScript vulnerability analysis and mitigation

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.0Patched 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.

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.


SourceNVD

Related JavaScript vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2026-34220CRITICAL9.3
  • JavaScriptJavaScript
  • @mikro-orm/core
NoYesMar 29, 2026
CVE-2026-34221HIGH8.3
  • JavaScriptJavaScript
  • @mikro-orm/core
NoYesMar 29, 2026
GHSA-7fqq-q52p-2jjgMEDIUM6.5
  • JavaScriptJavaScript
  • opencc
NoYesMar 29, 2026
CVE-2026-34224LOW2.1
  • JavaScriptJavaScript
  • parse-server
NoYesMar 29, 2026
GHSA-53p3-c7vp-4mccLOW2.1
  • JavaScriptJavaScript
  • action_text-trix
NoYesMar 29, 2026

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management