CWE-502
AllowedDeserialization of Untrusted Data
Abstraction: Base · Status: Draft
The product deserializes untrusted data without sufficiently ensuring that the resulting data will be valid.
5669 vulnerabilities reference this CWE, most recent first.
GHSA-2GXW-G2PJ-PX2Q
Vulnerability from github – Published: 2025-01-07 06:32 – Updated: 2026-04-08 18:33The Custom Product Tabs for WooCommerce plugin for WordPress is vulnerable to PHP Object Injection in all versions up to, and including, 1.8.5 via deserialization of untrusted input in the 'yikes_woo_products_tabs' post meta parameter. This makes it possible for authenticated attackers, with Shop Manager-level access and above, to inject a PHP Object. No known POP chain is present in the vulnerable software. If a POP chain is present via an additional plugin or theme installed on the target system, it could allow the attacker to delete arbitrary files, retrieve sensitive data, or execute code.
{
"affected": [],
"aliases": [
"CVE-2024-11465"
],
"database_specific": {
"cwe_ids": [
"CWE-502"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-01-07T05:15:13Z",
"severity": "HIGH"
},
"details": "The Custom Product Tabs for WooCommerce plugin for WordPress is vulnerable to PHP Object Injection in all versions up to, and including, 1.8.5 via deserialization of untrusted input in the \u0027yikes_woo_products_tabs\u0027 post meta parameter. This makes it possible for authenticated attackers, with Shop Manager-level access and above, to inject a PHP Object. No known POP chain is present in the vulnerable software. If a POP chain is present via an additional plugin or theme installed on the target system, it could allow the attacker to delete arbitrary files, retrieve sensitive data, or execute code.",
"id": "GHSA-2gxw-g2pj-px2q",
"modified": "2026-04-08T18:33:47Z",
"published": "2025-01-07T06:32:14Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-11465"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/browser/yikes-inc-easy-custom-woocommerce-product-tabs/trunk/admin/class.yikes-woo-generate-html.php#L19"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/browser/yikes-inc-easy-custom-woocommerce-product-tabs/trunk/admin/class.yikes-woo-saved-tabs.php#L222"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/browser/yikes-inc-easy-custom-woocommerce-product-tabs/trunk/admin/class.yikes-woo-saved-tabs.php#L449"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/browser/yikes-inc-easy-custom-woocommerce-product-tabs/trunk/public/class.yikes-woo-tabs-display.php#L47"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/browser/yikes-inc-easy-custom-woocommerce-product-tabs/trunk/yikes-inc-easy-custom-woocommerce-product-tabs.php#L262"
},
{
"type": "WEB",
"url": "https://plugins.trac.wordpress.org/changeset/3271575"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/1ad0d6eb-aafa-4f0b-bf1c-73d94e361087?source=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-2HG2-RQ96-788R
Vulnerability from github – Published: 2026-03-05 06:30 – Updated: 2026-03-09 15:30Deserialization of Untrusted Data vulnerability in axiomthemes Mounthood mounthood allows Object Injection.This issue affects Mounthood: from n/a through <= 1.3.2.
{
"affected": [],
"aliases": [
"CVE-2026-22501"
],
"database_specific": {
"cwe_ids": [
"CWE-502"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-03-05T06:16:21Z",
"severity": "CRITICAL"
},
"details": "Deserialization of Untrusted Data vulnerability in axiomthemes Mounthood mounthood allows Object Injection.This issue affects Mounthood: from n/a through \u003c= 1.3.2.",
"id": "GHSA-2hg2-rq96-788r",
"modified": "2026-03-09T15:30:32Z",
"published": "2026-03-05T06:30:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-22501"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/Wordpress/Theme/mounthood/vulnerability/wordpress-mounthood-theme-1-3-2-php-object-injection-vulnerability?_s_id=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-2HHM-RW5G-M2VQ
Vulnerability from github – Published: 2026-07-26 03:30 – Updated: 2026-07-26 03:30The Fluent Forms Pro Add On Pack plugin for WordPress is vulnerable to PHP Object Injection in all versions up to, and including, 6.2.6 via deserialization of untrusted input. This makes it possible for authenticated attackers, with Subscriber-level access and above, to inject a PHP Object. The additional presence of a POP chain allows attackers to change user passwords and potentially take over administrator accounts. Note: This can only be exploited if user update integration is enabled and a user meta field is mapped.
{
"affected": [],
"aliases": [
"CVE-2026-15962"
],
"database_specific": {
"cwe_ids": [
"CWE-502"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-07-26T02:16:28Z",
"severity": "HIGH"
},
"details": "The Fluent Forms Pro Add On Pack plugin for WordPress is vulnerable to PHP Object Injection in all versions up to, and including, 6.2.6 via deserialization of untrusted input. This makes it possible for authenticated attackers, with Subscriber-level access and above, to inject a PHP Object. The additional presence of a POP chain allows attackers to change user passwords and potentially take over administrator accounts. Note: This can only be exploited if user update integration is enabled and a user meta field is mapped.",
"id": "GHSA-2hhm-rw5g-m2vq",
"modified": "2026-07-26T03:30:25Z",
"published": "2026-07-26T03:30:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-15962"
},
{
"type": "WEB",
"url": "https://fluentforms.com"
},
{
"type": "WEB",
"url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/b95ec70c-ac76-48fa-9d9d-01cf1983e504?source=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-2HQJ-54FH-M5XP
Vulnerability from github – Published: 2026-03-05 06:30 – Updated: 2026-03-09 18:31Deserialization of Untrusted Data vulnerability in ThemeREX Pets Club petclub allows Object Injection.This issue affects Pets Club: from n/a through <= 2.3.
{
"affected": [],
"aliases": [
"CVE-2026-22453"
],
"database_specific": {
"cwe_ids": [
"CWE-502"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2026-03-05T06:16:19Z",
"severity": "CRITICAL"
},
"details": "Deserialization of Untrusted Data vulnerability in ThemeREX Pets Club petclub allows Object Injection.This issue affects Pets Club: from n/a through \u003c= 2.3.",
"id": "GHSA-2hqj-54fh-m5xp",
"modified": "2026-03-09T18:31:37Z",
"published": "2026-03-05T06:30:24Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-22453"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/Wordpress/Theme/petclub/vulnerability/wordpress-pets-club-theme-2-3-php-object-injection-vulnerability?_s_id=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-2J29-824J-4F3V
Vulnerability from github – Published: 2022-05-24 19:15 – Updated: 2022-05-24 19:15In Gradle Enterprise before 2021.1.3, a crafted request can trigger deserialization of arbitrary unsafe Java objects. The attacker must have the encryption and signing keys.
{
"affected": [],
"aliases": [
"CVE-2021-41588"
],
"database_specific": {
"cwe_ids": [
"CWE-502"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2021-09-24T15:15:00Z",
"severity": "HIGH"
},
"details": "In Gradle Enterprise before 2021.1.3, a crafted request can trigger deserialization of arbitrary unsafe Java objects. The attacker must have the encryption and signing keys.",
"id": "GHSA-2j29-824j-4f3v",
"modified": "2022-05-24T19:15:42Z",
"published": "2022-05-24T19:15:42Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-41588"
},
{
"type": "WEB",
"url": "https://security.gradle.com/advisory/2021-03"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-2J4C-4VW2-9R77
Vulnerability from github – Published: 2022-05-13 01:19 – Updated: 2022-05-13 01:19A potential Remote Arbitrary Code Execution vulnerability has been identified in Micro Focus' Real User Monitoring software, versions 9.26IP, 9.30, 9.40 and 9.50. The vulnerability could be exploited to execute arbitrary code.
{
"affected": [],
"aliases": [
"CVE-2018-18589"
],
"database_specific": {
"cwe_ids": [
"CWE-502"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2018-10-23T17:29:00Z",
"severity": "HIGH"
},
"details": "A potential Remote Arbitrary Code Execution vulnerability has been identified in Micro Focus\u0027 Real User Monitoring software, versions 9.26IP, 9.30, 9.40 and 9.50. The vulnerability could be exploited to execute arbitrary code.",
"id": "GHSA-2j4c-4vw2-9r77",
"modified": "2022-05-13T01:19:39Z",
"published": "2022-05-13T01:19:39Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2018-18589"
},
{
"type": "WEB",
"url": "https://softwaresupport.softwaregrp.com/document/-/facetsearch/document/KM03272900"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-2J4H-MGWQ-9X58
Vulnerability from github – Published: 2022-05-24 17:16 – Updated: 2022-05-24 17:16The Apros Evolution, ConsciusMap, and Furukawa provisioning systems through 2.8.1 allow remote code execution because of javax.faces.ViewState Java deserialization.
{
"affected": [],
"aliases": [
"CVE-2020-12133"
],
"database_specific": {
"cwe_ids": [
"CWE-502"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2020-04-27T15:15:00Z",
"severity": "HIGH"
},
"details": "The Apros Evolution, ConsciusMap, and Furukawa provisioning systems through 2.8.1 allow remote code execution because of javax.faces.ViewState Java deserialization.",
"id": "GHSA-2j4h-mgwq-9x58",
"modified": "2022-05-24T17:16:35Z",
"published": "2022-05-24T17:16:35Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2020-12133"
},
{
"type": "WEB",
"url": "https://www.furukawa.co.jp"
},
{
"type": "WEB",
"url": "https://www.tecnoredsa.com.ar"
},
{
"type": "WEB",
"url": "http://packetstormsecurity.com/files/157383/Furukawa-Electric-ConsciusMAP-2.8.1-Java-Deserialization-Remote-Code-Execution.html"
}
],
"schema_version": "1.4.0",
"severity": []
}
GHSA-2J65-72JP-X2MJ
Vulnerability from github – Published: 2023-06-23 09:30 – Updated: 2024-04-04 05:02A deserialization of untrusted data in Fortinet FortiNAC below 7.2.1, below 9.4.3, below 9.2.8 and all earlier versions of 8.x allows attacker to execute unauthorized code or commands via specifically crafted request on inter-server communication port. Note FortiNAC versions 8.x will not be fixed.
{
"affected": [],
"aliases": [
"CVE-2023-33299"
],
"database_specific": {
"cwe_ids": [
"CWE-502"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2023-06-23T08:15:09Z",
"severity": "CRITICAL"
},
"details": "A deserialization of untrusted data in Fortinet FortiNAC below 7.2.1, below 9.4.3, below 9.2.8 and all earlier versions of 8.x allows attacker to execute unauthorized code or commands via specifically crafted request on inter-server communication port. Note FortiNAC versions 8.x will not be fixed.",
"id": "GHSA-2j65-72jp-x2mj",
"modified": "2024-04-04T05:02:28Z",
"published": "2023-06-23T09:30:17Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-33299"
},
{
"type": "WEB",
"url": "https://fortiguard.com/psirt/FG-IR-23-074"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-2JJ7-5PHW-H5CH
Vulnerability from github – Published: 2025-11-06 18:32 – Updated: 2026-01-20 15:31Deserialization of Untrusted Data vulnerability in NooTheme WeMusic noo-wemusic allows Object Injection.This issue affects WeMusic: from n/a through <= 1.9.1.
{
"affected": [],
"aliases": [
"CVE-2025-53586"
],
"database_specific": {
"cwe_ids": [
"CWE-502"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-11-06T16:15:57Z",
"severity": "CRITICAL"
},
"details": "Deserialization of Untrusted Data vulnerability in NooTheme WeMusic noo-wemusic allows Object Injection.This issue affects WeMusic: from n/a through \u003c= 1.9.1.",
"id": "GHSA-2jj7-5phw-h5ch",
"modified": "2026-01-20T15:31:48Z",
"published": "2025-11-06T18:32:54Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-53586"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/Wordpress/Theme/noo-wemusic/vulnerability/wordpress-wemusic-theme-1-9-1-php-object-injection-vulnerability?_s_id=cve"
},
{
"type": "WEB",
"url": "https://vdp.patchstack.com/database/Wordpress/Theme/noo-wemusic/vulnerability/wordpress-wemusic-theme-1-9-1-php-object-injection-vulnerability"
},
{
"type": "WEB",
"url": "https://vdp.patchstack.com/database/Wordpress/Theme/noo-wemusic/vulnerability/wordpress-wemusic-theme-1-9-1-php-object-injection-vulnerability?_s_id=cve"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
GHSA-2JX3-FF3V-J7JJ
Vulnerability from github – Published: 2026-09-24 19:09 – Updated: 2026-09-24 19:09[!NOTE] This finding was identified during an agentic unsafe Rust code review performed by Gemini AI, followed by human review and verification.
The Issue
The crate exports a public safe API Rules::deserialize accepting any generic byte sequence B: AsRef<[u8]>. It restores compiled rule structures directly from raw bytes using bincode::serde::decode_from_slice.
This decoded Rules struct contains internal lookup tables, including sub_patterns: Vec<(PatternId, SubPattern)>, atoms: Vec<SubPatternAtom>, and lit_pool: BStringPool. Subsequent safe operations assume these internal tables satisfy strict structural invariants:
Rules::get_sub_patternexecutesunsafe { self.sub_patterns.get_unchecked(sub_pattern_id.0 as usize) }. If untrusted serialized bytes contain an atom referencing an out-of-boundsSubPatternId, callingget_sub_patternduring scanning triggers an out-of-bounds memory read (Undefined Behavior).
https://github.com/VirusTotal/yara-x/blob/5bd1f35db783679c90a3ea1a66bd15fe4e55bef1/lib/src/compiler/rules.rs#L355-L360
Metadata::next()extracts string metadata viaunsafe { s.to_str_unchecked() }. If serialized bytes corruptlit_poolindices or structural data,to_str_uncheckedconstructs a&strpointing to invalid UTF-8 bytes (Undefined Behavior).
https://github.com/VirusTotal/yara-x/blob/5bd1f35db783679c90a3ea1a66bd15fe4e55bef1/lib/src/models.rs#L204-L210
Because passing malformed or untrusted data to Rules::deserialize induces Undefined Behavior in subsequent safe calls (Scanner::new, Scanner::scan) without any unsafe blocks in caller code, this API is unsound.
use yara_x::{Rules, Scanner};
fn main() {
// Embed the crashing payload generated by the fuzzer at compile time.
let serialized = include_bytes!("crashing_payload.bin");
println!("Loaded embedded crashing payload, length: {}", serialized.len());
// Deserialize. On unmodified library, this succeeds because the WASM and headers
// are pristine and structural corruption isn't validated.
if let Ok(deserialized) = Rules::deserialize(serialized) {
println!("Deserialization succeeded! Running scanner...");
let mut scanner = Scanner::new(&deserialized);
// Run the standard scan, which will execute the WASM and trigger the out-of-bounds read!
let _ = scanner.scan(b"lorem ipsum dolor sit amet");
println!("Scanner finished.");
} else {
println!("Deserialization failed!");
}
}
### 1. Miri Trace
NOTE: This needs to be run with 1.17.0. I haven't tested this against other versions.
Unfortunately I was able to get a miri trace, but I'm not able to reproduce it right now because of lockfile changes. If you're trying this out be sure to use `MIRIFLAGS="-Zmiri-disable-stacked-borrows"`
### 2. Segfault / panics
When run natively (without Miri or any sanitizers) on a standard Linux platform, the process immediately segfaults:
$ cargo run --bin verify
Loaded embedded crashing payload, length: 11777
Deserialization succeeded! Running scanner...
Segmentation fault (core dumped)
And with a newer compiler (which appears to have debug assertions in `get_unchecked)`
Deserialization succeeded! Running scanner...
thread 'main' (997442) panicked at lib/src/compiler/rules.rs:404:36:
unsafe precondition(s) violated: slice::get_unchecked requires that the index is within the slice
This indicates a bug in the program. This Undefined Behavior check is optional, and cannot be relied on for safety.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Suggested Fix
To uphold Rust soundness guarantees, either mark `Rules::deserialize` as `pub unsafe fn deserialize` with a formal `/// # Safety` contract documenting that callers are responsible for verifying the authenticity and structural integrity of the input bytes (e.g. via cryptographic signatures), or replace all internal `get_unchecked` and `to_str_unchecked` calls on deserialized data structures with safe bounds checks (`.get()`) and UTF-8 validation (`std::str::from_utf8`).
{
"affected": [
{
"database_specific": {
"last_known_affected_version_range": "\u003c= 1.18.0"
},
"package": {
"ecosystem": "crates.io",
"name": "yara-x"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.19.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [],
"database_specific": {
"cwe_ids": [
"CWE-502"
],
"github_reviewed": true,
"github_reviewed_at": "2026-09-24T19:09:28Z",
"nvd_published_at": null,
"severity": "MODERATE"
},
"details": "\u003e [!NOTE]\n\u003e This finding was identified during an agentic unsafe Rust code review performed by Gemini AI, followed by human review and verification.\n\n\n## The Issue\n\nThe crate exports a public safe API [`Rules::deserialize`](https://github.com/VirusTotal/yara-x/blob/5bd1f35db783679c90a3ea1a66bd15fe4e55bef1/lib/src/compiler/rules.rs#L187-L254) accepting any generic byte sequence `B: AsRef\u003c[u8]\u003e`. It restores compiled rule structures directly from raw bytes using `bincode::serde::decode_from_slice`.\n\nThis decoded `Rules` struct contains internal lookup tables, including `sub_patterns: Vec\u003c(PatternId, SubPattern)\u003e`, `atoms: Vec\u003cSubPatternAtom\u003e`, and `lit_pool: BStringPool`. Subsequent safe operations assume these internal tables satisfy strict structural invariants:\n\n- `Rules::get_sub_pattern` executes `unsafe { self.sub_patterns.get_unchecked(sub_pattern_id.0 as usize) }`. If untrusted serialized bytes contain an atom referencing an out-of-bounds `SubPatternId`, calling `get_sub_pattern` during scanning triggers an out-of-bounds memory read (Undefined Behavior).\n\nhttps://github.com/VirusTotal/yara-x/blob/5bd1f35db783679c90a3ea1a66bd15fe4e55bef1/lib/src/compiler/rules.rs#L355-L360\n\n\n- `Metadata::next()` extracts string metadata via `unsafe { s.to_str_unchecked() }`. If serialized bytes corrupt `lit_pool` indices or structural data, `to_str_unchecked` constructs a `\u0026str` pointing to invalid UTF-8 bytes (Undefined Behavior).\n\nhttps://github.com/VirusTotal/yara-x/blob/5bd1f35db783679c90a3ea1a66bd15fe4e55bef1/lib/src/models.rs#L204-L210\n\nBecause passing malformed or untrusted data to `Rules::deserialize` induces Undefined Behavior in subsequent safe calls (`Scanner::new`, `Scanner::scan`) without any `unsafe` blocks in caller code, this API is unsound.\n\n\n\u003cdetails\u003e\u003csummary\u003eMinimal Reproduction (Miri / Native Crash)\u003c/summary\u003e\n\nZip file with crashing_payload: \n[crashing_payload.zip](https://github.com/user-attachments/files/29173221/crashing_payload.zip)\n\nWe have a payload crashing_payload.bin where only a single byte in the structural metadata tail is mutated (changing a `SubPatternId` from `1` to `248` while keeping the WebAssembly bytecode completely untouched and valid).\n\nBelow is the self-contained verification script which compiles and runs against the official **unmodified** `yara-x v1.17.0` crate:\n\n```rust\nuse yara_x::{Rules, Scanner};\n\nfn main() {\n // Embed the crashing payload generated by the fuzzer at compile time.\n let serialized = include_bytes!(\"crashing_payload.bin\");\n println!(\"Loaded embedded crashing payload, length: {}\", serialized.len());\n\n // Deserialize. On unmodified library, this succeeds because the WASM and headers\n // are pristine and structural corruption isn\u0027t validated.\n if let Ok(deserialized) = Rules::deserialize(serialized) {\n println!(\"Deserialization succeeded! Running scanner...\");\n let mut scanner = Scanner::new(\u0026deserialized);\n \n // Run the standard scan, which will execute the WASM and trigger the out-of-bounds read!\n let _ = scanner.scan(b\"lorem ipsum dolor sit amet\");\n println!(\"Scanner finished.\");\n } else {\n println!(\"Deserialization failed!\");\n }\n}\n```\n\n### 1. Miri Trace\n\nNOTE: This needs to be run with 1.17.0. I haven\u0027t tested this against other versions.\n\n\nUnfortunately I was able to get a miri trace, but I\u0027m not able to reproduce it right now because of lockfile changes. If you\u0027re trying this out be sure to use `MIRIFLAGS=\"-Zmiri-disable-stacked-borrows\"`\n\n\n### 2. Segfault / panics\n\nWhen run natively (without Miri or any sanitizers) on a standard Linux platform, the process immediately segfaults:\n\n```bash\n$ cargo run --bin verify\nLoaded embedded crashing payload, length: 11777\nDeserialization succeeded! Running scanner...\nSegmentation fault (core dumped)\n```\n\nAnd with a newer compiler (which appears to have debug assertions in `get_unchecked)`\n\n\n```bash\nDeserialization succeeded! Running scanner...\n\nthread \u0027main\u0027 (997442) panicked at lib/src/compiler/rules.rs:404:36:\nunsafe precondition(s) violated: slice::get_unchecked requires that the index is within the slice\n\nThis indicates a bug in the program. This Undefined Behavior check is optional, and cannot be relied on for safety.\nnote: run with `RUST_BACKTRACE=1` environment variable to display a backtrace\n```\n\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\u003csummary\u003eSuggested Fix\u003c/summary\u003e\n\nTo uphold Rust soundness guarantees, either mark `Rules::deserialize` as `pub unsafe fn deserialize` with a formal `/// # Safety` contract documenting that callers are responsible for verifying the authenticity and structural integrity of the input bytes (e.g. via cryptographic signatures), or replace all internal `get_unchecked` and `to_str_unchecked` calls on deserialized data structures with safe bounds checks (`.get()`) and UTF-8 validation (`std::str::from_utf8`).\n\n\u003c/details\u003e\n\n---",
"id": "GHSA-2jx3-ff3v-j7jj",
"modified": "2026-09-24T19:09:28Z",
"published": "2026-09-24T19:09:28Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/VirusTotal/yara-x/security/advisories/GHSA-2jx3-ff3v-j7jj"
},
{
"type": "WEB",
"url": "https://github.com/VirusTotal/yara-x/commit/25efa375572efcfbe880a263ee3b0932d4b61a24"
},
{
"type": "PACKAGE",
"url": "https://github.com/VirusTotal/yara-x"
},
{
"type": "WEB",
"url": "https://github.com/VirusTotal/yara-x/releases/tag/v1.19.0"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:L/UI:N/VC:N/VI:N/VA:L/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "yara-x: Unvalidated deserialization in safe `Rules::deserialize` allows memory corruption and UB"
}
Mitigation
If available, use the signing/sealing features of the programming language to assure that deserialized data has not been tainted. For example, a hash-based message authentication code (HMAC) could be used to ensure that data has not been modified.
Mitigation
When deserializing data, populate a new object rather than just deserializing. The result is that the data flows through safe input validation and that the functions are safe.
Mitigation
Explicitly define a final object() to prevent deserialization.
Mitigation
- Make fields transient to protect them from deserialization.
- An attempt to serialize and then deserialize a class containing transient fields will result in NULLs where the transient data should be. This is an excellent way to prevent time, environment-based, or sensitive variables from being carried over and used improperly.
Mitigation
Avoid having unnecessary types or gadgets (a sequence of instances and method invocations that can self-execute during the deserialization process, often found in libraries) available that can be leveraged for malicious ends. This limits the potential for unintended or unauthorized types and gadgets to be leveraged by the attacker. Add only acceptable classes to an allowlist. Note: new gadgets are constantly being discovered, so this alone is not a sufficient mitigation.
Mitigation
Employ cryptography of the data or code for protection. However, it's important to note that it would still be client-side security. This is risky because if the client is compromised then the security implemented on the client (the cryptography) can be bypassed.
Mitigation MIT-29
Strategy: Firewall
Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481].
CAPEC-586: Object Injection
An adversary attempts to exploit an application by injecting additional, malicious content during its processing of serialized objects. Developers leverage serialization in order to convert data or state into a static, binary format for saving to disk or transferring over a network. These objects are then deserialized when needed to recover the data/state. By injecting a malformed object into a vulnerable application, an adversary can potentially compromise the application by manipulating the deserialization process. This can result in a number of unwanted outcomes, including remote code execution.