Code Injection in github.com/ibireme/yyjson (CVE-2024-25713)
Summary
Code injection in github.com/ibireme/yyjson (CVE-2024-25713). Data can be tampered with by attackers. Exploitable via doc. Mitigation: upgrade to 0.9.0 or later.
Original description
The description as published by the source.
Summary
The pool series allocator (pool_malloc/pool_free/pool_realloc) by yysjon has a Double Free vulnerability, which may lead to arbitrary address writing and Denial of Service (DoS) attacks.
Arbitrary address writing, combined with other legitimate or illegitimate operations of programs using this library, can lead to remote code execution.
Details
The core cause of this vulnerability lies in the pool_free function's lack of loop checks, while the direct cause stems from the pool_free function and similar free-series functions not performing pointer destruction, resulting in Use-After-Free (UAF) vulnerabilities.
PoC
Below, a C language program using yyjson 0.8.0 is written to show how to exploit a Double Free vulnerability to cause chunk overlaps, which then allows the modification of a chunk's next pointer to point to an arbitrary address. If the targeted address is valid, modifications can be made. However, if the address is invalid, it could lead to the program crashing, which could be exploited for a Denial of Service (DoS) attack. Additionally, constructing a cyclic chain of chunks could force the service into an infinite loop, also exploitable for a DoS attack.
#include
#include "yyjson.h"
char test[0x110];
int64_t a=0xffffffff;
int64_t b= (int64_t) test;
int main() {
size_t max_json_size = 64 * 1024;
size_t buf_size = yyjson_read_max_memory_usage(max_json_size, 0);
void *buf = malloc(buf_size);
yyjson_alc alc;
yyjson…
Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV
Auto-generated summary
Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.
A vulnerability tracked as CVE-2024-25713 has been found in github.com/ibireme/yyjson.
Attackers can target a specific entry point like doc over the network to misuse the product.
Data can be tampered with by attackers.
What to do: upgrade github.com/ibireme/yyjson to 0.9.0 or later.
If unsure, ask your IT team or search "github.com/ibireme/yyjson CVE-2024-25713" on the vendor's site.
CVE-2024-25713 (github.com/ibireme/yyjson) — CWE-94
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: doc
Patched: 0.9.0 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.
Arbitrary code execution (CWE-94) exists in github.com/ibireme/yyjson. Attackers reach the vulnerable code path via doc without authentication.
Check the vendor advisory for the affected versions of github.com/ibireme/yyjson. Attack surface: doc.
Severity: ?. Data can be tampered with by attackers.
Update to 0.9.0.
Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.
Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'github.com/ibireme/yyjson' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.
Response actions
Concrete steps and command examples for SOC/SRE teams to execute in order
-
1Identify exposure identify
grep -r 'github.com/ibireme/yyjson' . | grep -v node_modulesリポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で
github.com/ibireme/yyjsonを grep し、稼働しているサービス・バージョンを把握する。 -
2Apply patch patch
Upgrade github.com/ibireme/yyjson to 0.9.0ステージング環境で 0.9.0 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。
-
3Post-deployment verification verify
Confirm patched version is live in productionパッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。
Affected packages
References
- advisory nvd.nist.gov
- package github.com
- web github.com
- web github.com
- web lists.fedoraproject.org
- web lists.fedoraproject.org
- web lists.fedoraproject.org
- web lists.fedoraproject.org
- web lists.fedoraproject.org
- web lists.fedoraproject.org