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.
4914 vulnerabilities reference this CWE, most recent first.
GHSA-7X93-M29H-6J9Q
Vulnerability from github – Published: 2022-12-26 15:30 – Updated: 2023-01-05 00:30The Stop Spammers Security | Block Spam Users, Comments, Forms WordPress plugin before 2022.6 passes base64 encoded user input to the unserialize() PHP function when CAPTCHA are used as second challenge, which could lead to PHP Object injection if a plugin installed on the blog has a suitable gadget chain
{
"affected": [],
"aliases": [
"CVE-2022-4120"
],
"database_specific": {
"cwe_ids": [
"CWE-502"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-12-26T13:15:00Z",
"severity": "CRITICAL"
},
"details": "The Stop Spammers Security | Block Spam Users, Comments, Forms WordPress plugin before 2022.6 passes base64 encoded user input to the unserialize() PHP function when CAPTCHA are used as second challenge, which could lead to PHP Object injection if a plugin installed on the blog has a suitable gadget chain",
"id": "GHSA-7x93-m29h-6j9q",
"modified": "2023-01-05T00:30:18Z",
"published": "2022-12-26T15:30:25Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-4120"
},
{
"type": "WEB",
"url": "https://wpscan.com/vulnerability/e8bb79db-ef77-43be-b449-4c4b5310eedf"
}
],
"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-7XCV-9J6C-2FMC
Vulnerability from github – Published: 2025-11-18 21:32 – Updated: 2025-11-18 22:08Unsafe Deserialization vulnerability in Modular Max Serve before 25.6, specifically when the "--experimental-enable-kvcache-agent" feature is used allowing attackers to execute arbitrary code.
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "modular"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "25.6.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2025-60455"
],
"database_specific": {
"cwe_ids": [
"CWE-502"
],
"github_reviewed": true,
"github_reviewed_at": "2025-11-18T22:08:39Z",
"nvd_published_at": "2025-11-18T19:15:49Z",
"severity": "CRITICAL"
},
"details": "Unsafe Deserialization vulnerability in Modular Max Serve before 25.6, specifically when the \"--experimental-enable-kvcache-agent\" feature is used allowing attackers to execute arbitrary code.",
"id": "GHSA-7xcv-9j6c-2fmc",
"modified": "2025-11-18T22:08:39Z",
"published": "2025-11-18T21:32:31Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-60455"
},
{
"type": "WEB",
"url": "https://github.com/modular/modular/issues/4795"
},
{
"type": "WEB",
"url": "https://github.com/modular/modular/commit/10620059fb5c47fb0c30e5d21a8ff3b8d622fba4"
},
{
"type": "WEB",
"url": "https://github.com/modular/modular/commit/b20e749fa892dbe772e890a268002f732164d9f5"
},
{
"type": "WEB",
"url": "https://github.com/modular/modular/commit/ee9c4ab02345dd30bed8b79771b6909ff1b930a1"
},
{
"type": "PACKAGE",
"url": "https://github.com/modular/modular"
},
{
"type": "WEB",
"url": "https://github.com/modular/modular/blame/main/max/serve/kvcache_agent/kvcache_agent.py#L220"
},
{
"type": "WEB",
"url": "https://www.oligo.security/blog/shadowmq-how-code-reuse-spread-critical-vulnerabilities-across-the-ai-ecosystem"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "Modular Max Serve has Unsafe Deserialization vulnerability"
}
GHSA-7XVC-V44J-46FH
Vulnerability from github – Published: 2023-10-06 06:30 – Updated: 2023-10-13 19:36Versions of the package geokit-rails before 2.5.0 are vulnerable to Command Injection due to unsafe deserialisation of YAML within the 'geo_location' cookie. This issue can be exploited remotely via a malicious cookie value.
Note:
An attacker can use this vulnerability to execute commands on the host system.
{
"affected": [
{
"package": {
"ecosystem": "RubyGems",
"name": "geokit-rails"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.5.0"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2023-26153"
],
"database_specific": {
"cwe_ids": [
"CWE-502",
"CWE-77"
],
"github_reviewed": true,
"github_reviewed_at": "2023-10-06T18:45:58Z",
"nvd_published_at": "2023-10-06T05:15:52Z",
"severity": "CRITICAL"
},
"details": "Versions of the package geokit-rails before 2.5.0 are vulnerable to Command Injection due to unsafe deserialisation of YAML within the \u0027geo_location\u0027 cookie. This issue can be exploited remotely via a malicious cookie value.\n\n**Note:**\n\n An attacker can use this vulnerability to execute commands on the host system.",
"id": "GHSA-7xvc-v44j-46fh",
"modified": "2023-10-13T19:36:29Z",
"published": "2023-10-06T06:30:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2023-26153"
},
{
"type": "WEB",
"url": "https://github.com/geokit/geokit-rails/commit/7ffc5813e57f6f417987043e1039925fd0865c43"
},
{
"type": "WEB",
"url": "https://github.com/geokit/geokit-rails/commit/a93dfe49fb9aeae7164e2f8c4041450a04b5482f"
},
{
"type": "WEB",
"url": "https://gist.github.com/CalumHutton/b7aa1c2e71c8d4386463ac14f686901d"
},
{
"type": "ADVISORY",
"url": "https://github.com/advisories/GHSA-7xvc-v44j-46fh"
},
{
"type": "PACKAGE",
"url": "https://github.com/geokit/geokit-rails"
},
{
"type": "WEB",
"url": "https://github.com/geokit/geokit-rails/blob/master/lib/geokit-rails/ip_geocode_lookup.rb#L37"
},
{
"type": "WEB",
"url": "https://github.com/geokit/geokit-rails/blob/master/lib/geokit-rails/ip_geocode_lookup.rb%23L37"
},
{
"type": "WEB",
"url": "https://github.com/rubysec/ruby-advisory-db/blob/master/gems/geokit-rails/CVE-2023-26153.yml"
},
{
"type": "WEB",
"url": "https://security.snyk.io/vuln/SNYK-RUBY-GEOKITRAILS-5920323"
}
],
"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"
}
],
"summary": "geokit-rails Command Injection vulnerability"
}
GHSA-7XW3-W6Q8-Q6WG
Vulnerability from github – Published: 2022-11-10 12:01 – Updated: 2025-05-01 15:31The AMS module has a vulnerability of serialization/deserialization mismatch. Successful exploitation of this vulnerability may cause privilege escalation.
{
"affected": [],
"aliases": [
"CVE-2022-44559"
],
"database_specific": {
"cwe_ids": [
"CWE-502"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2022-11-09T21:15:00Z",
"severity": "CRITICAL"
},
"details": "The AMS module has a vulnerability of serialization/deserialization mismatch. Successful exploitation of this vulnerability may cause privilege escalation.",
"id": "GHSA-7xw3-w6q8-q6wg",
"modified": "2025-05-01T15:31:30Z",
"published": "2022-11-10T12:01:16Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2022-44559"
},
{
"type": "WEB",
"url": "https://consumer.huawei.com/en/support/bulletin/2022/11"
},
{
"type": "WEB",
"url": "https://device.harmonyos.com/en/docs/security/update/security-bulletins-phones-202211-0000001441016433"
}
],
"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-8237-957H-H2C2
Vulnerability from github – Published: 2024-11-13 18:43 – Updated: 2024-11-18 20:35Impact
Deserialization of untrusted data from the mimes parameter could lead to remote code execution.
Patches
Fixed in 3.0.9
Workarounds
Not needed, a composer update will solve it in a non-breaking way.
References
Reported responsibly Vladislav Gladkiy at Positive Technologies.
{
"affected": [
{
"package": {
"ecosystem": "Packagist",
"name": "backpack/filemanager"
},
"ranges": [
{
"events": [
{
"introduced": "3.0.0"
},
{
"fixed": "3.0.9"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Packagist",
"name": "backpack/filemanager"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "2.0.2"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2024-52306"
],
"database_specific": {
"cwe_ids": [
"CWE-502"
],
"github_reviewed": true,
"github_reviewed_at": "2024-11-13T18:43:02Z",
"nvd_published_at": "2024-11-13T16:15:20Z",
"severity": "HIGH"
},
"details": "### Impact\nDeserialization of untrusted data from the `mimes` parameter could lead to remote code execution.\n\n### Patches\nFixed in 3.0.9\n\n### Workarounds\nNot needed, a `composer update` will solve it in a non-breaking way.\n\n### References\nReported responsibly [Vladislav Gladkiy](https://github.com/catferq) at [Positive Technologies](https://www.ptsecurity.com/ww-en/).",
"id": "GHSA-8237-957h-h2c2",
"modified": "2024-11-18T20:35:06Z",
"published": "2024-11-13T18:43:02Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/Laravel-Backpack/FileManager/security/advisories/GHSA-8237-957h-h2c2"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-52306"
},
{
"type": "WEB",
"url": "https://github.com/Laravel-Backpack/FileManager/commit/2830498b85e05fb3c92179053b4d7c4a0fdb880b"
},
{
"type": "PACKAGE",
"url": "https://github.com/Laravel-Backpack/FileManager"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:H/A:H",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:N/AC:L/AT:N/PR:H/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N",
"type": "CVSS_V4"
}
],
"summary": "FileManager Deserialization of Untrusted Data vulnerability"
}
GHSA-8278-88VV-X98R
Vulnerability from github – Published: 2021-03-10 21:51 – Updated: 2024-10-27 15:38Impact
It is possible to run arbitrary commands through the yaml.load() method. This could allow an attacker with local access to the host to run arbitrary code by running the application with a specially crafted YAML configuration file.
Workarounds
Manually adjust yaml.load() to yaml.safe_load()
For more information
If you have any questions or comments about this advisory: * Open an issue in tenable/integration-jira-cloud * Email us at vulnreport@tenable.com
{
"affected": [
{
"package": {
"ecosystem": "PyPI",
"name": "tenable-jira-cloud"
},
"ranges": [
{
"events": [
{
"introduced": "0"
},
{
"fixed": "1.1.21"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2021-21371"
],
"database_specific": {
"cwe_ids": [
"CWE-502"
],
"github_reviewed": true,
"github_reviewed_at": "2021-03-10T21:51:06Z",
"nvd_published_at": "2021-03-10T22:15:00Z",
"severity": "MODERATE"
},
"details": "### Impact\nIt is possible to run arbitrary commands through the yaml.load() method. This could allow an attacker with local access to the host to run arbitrary code by running the application with a specially crafted YAML configuration file.\n\n### Workarounds\nManually adjust yaml.load() to yaml.safe_load()\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [tenable/integration-jira-cloud](https://github.com/tenable/integration-jira-cloud/issues)\n* Email us at [vulnreport@tenable.com](mailto:vulnreport@tenable.com)",
"id": "GHSA-8278-88vv-x98r",
"modified": "2024-10-27T15:38:08Z",
"published": "2021-03-10T21:51:17Z",
"references": [
{
"type": "WEB",
"url": "https://github.com/tenable/integration-jira-cloud/security/advisories/GHSA-8278-88vv-x98r"
},
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2021-21371"
},
{
"type": "WEB",
"url": "https://github.com/tenable/integration-jira-cloud/commit/f8c2095fd529e664e7fa25403a0a4a85bb3907d0"
},
{
"type": "WEB",
"url": "https://github.com/pypa/advisory-database/tree/main/vulns/tenable-jira-cloud/PYSEC-2021-60.yaml"
},
{
"type": "PACKAGE",
"url": "https://github.com/tenable/integration-jira-cloud"
},
{
"type": "WEB",
"url": "https://pypi.org/project/tenable-jira-cloud"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N",
"type": "CVSS_V3"
},
{
"score": "CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:L/VI:L/VA:N/SC:L/SI:L/SA:N",
"type": "CVSS_V4"
}
],
"summary": "Execution of untrusted code through config file"
}
GHSA-8295-CM83-6HV4
Vulnerability from github – Published: 2025-07-16 12:30 – Updated: 2026-04-01 18:35Deserialization of Untrusted Data vulnerability in designthemes Visual Art | Gallery WordPress Theme allows Object Injection. This issue affects Visual Art | Gallery WordPress Theme: from n/a through 2.4.
{
"affected": [],
"aliases": [
"CVE-2025-31422"
],
"database_specific": {
"cwe_ids": [
"CWE-502"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-07-16T12:15:26Z",
"severity": "HIGH"
},
"details": "Deserialization of Untrusted Data vulnerability in designthemes Visual Art | Gallery WordPress Theme allows Object Injection. This issue affects Visual Art | Gallery WordPress Theme: from n/a through 2.4.",
"id": "GHSA-8295-cm83-6hv4",
"modified": "2026-04-01T18:35:47Z",
"published": "2025-07-16T12:30:26Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-31422"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/wordpress/theme/visual-arts/vulnerability/wordpress-visual-art-gallery-wordpress-theme-2-4-php-object-injection-vulnerability?_s_id=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-8297-V2RF-2P32
Vulnerability from github – Published: 2026-04-27 09:34 – Updated: 2026-05-07 05:27Apache MINA's AbstractIoBuffer.resolveClass() contains two branches, one of them (for static classes or primitive types) does not check the class at all, bypassing the classname allowlist and allowing arbitrary code to be executed.
The fix checks if the class is present in the accepted class filter before calling Class.forName().
Affected versions are Apache MINA 2.0.0 <= 2.0.27, 2.1.0 <= 2.1.10, and 2.2.0 <= 2.2.5.
The problem is resolved in Apache MINA 2.0.28, 2.1.11, and 2.2.6 by applying the classname allowlist earlier.
Affected are applications using Apache MINA that call IoBuffer.getObject().
Applications using Apache MINA are advised to upgrade.
{
"affected": [
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.mina:mina-core"
},
"ranges": [
{
"events": [
{
"introduced": "2.0.0"
},
{
"fixed": "2.0.28"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.mina:mina-core"
},
"ranges": [
{
"events": [
{
"introduced": "2.1.0"
},
{
"fixed": "2.1.11"
}
],
"type": "ECOSYSTEM"
}
]
},
{
"package": {
"ecosystem": "Maven",
"name": "org.apache.mina:mina-core"
},
"ranges": [
{
"events": [
{
"introduced": "2.2.0"
},
{
"fixed": "2.2.6"
}
],
"type": "ECOSYSTEM"
}
]
}
],
"aliases": [
"CVE-2026-41635"
],
"database_specific": {
"cwe_ids": [
"CWE-502"
],
"github_reviewed": true,
"github_reviewed_at": "2026-05-07T05:27:52Z",
"nvd_published_at": "2026-04-27T09:16:01Z",
"severity": "CRITICAL"
},
"details": "Apache MINA\u0027s AbstractIoBuffer.resolveClass() contains two branches, one of them (for static classes or primitive types) does not check the class at all, bypassing the classname allowlist and allowing arbitrary code to be executed.\n\nThe fix checks if the class is present in the accepted class filter\u00a0before calling\u00a0Class.forName().\u00a0\n\nAffected versions are Apache MINA 2.0.0 \u003c= 2.0.27, 2.1.0 \u003c= 2.1.10, and 2.2.0 \u003c= 2.2.5.\n\nThe problem is resolved in Apache MINA 2.0.28, 2.1.11, and 2.2.6 by applying the classname allowlist earlier.\n\nAffected are applications using Apache MINA that call\u00a0IoBuffer.getObject().\n\nApplications using Apache MINA are advised to upgrade.",
"id": "GHSA-8297-v2rf-2p32",
"modified": "2026-05-07T05:27:52Z",
"published": "2026-04-27T09:34:39Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2026-41635"
},
{
"type": "PACKAGE",
"url": "https://github.com/apache/mina"
},
{
"type": "WEB",
"url": "https://lists.apache.org/thread/1l91w1mqsb3lwfd504fs045ylxntt2tm"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2026/04/27/4"
}
],
"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"
}
],
"summary": "Apache MINA vulnerable to Deserialization of Untrusted Data"
}
GHSA-829C-JP2V-3J35
Vulnerability from github – Published: 2025-04-01 21:31 – Updated: 2026-04-01 18:34Deserialization of Untrusted Data vulnerability in magepeopleteam WpTravelly allows Object Injection. This issue affects WpTravelly: from n/a through 1.8.7.
{
"affected": [],
"aliases": [
"CVE-2025-30892"
],
"database_specific": {
"cwe_ids": [
"CWE-502"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2025-04-01T21:15:45Z",
"severity": "HIGH"
},
"details": "Deserialization of Untrusted Data vulnerability in magepeopleteam WpTravelly allows Object Injection. This issue affects WpTravelly: from n/a through 1.8.7.",
"id": "GHSA-829c-jp2v-3j35",
"modified": "2026-04-01T18:34:25Z",
"published": "2025-04-01T21:31:32Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2025-30892"
},
{
"type": "WEB",
"url": "https://patchstack.com/database/wordpress/plugin/tour-booking-manager/vulnerability/wordpress-wptravelly-plugin-1-8-7-php-object-injection-vulnerability?_s_id=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-82X4-8Q4X-2QXV
Vulnerability from github – Published: 2024-04-29 15:30 – Updated: 2025-02-13 18:32Deserialization of untrusted data can occur in the R statistical programming language, on any version starting at 1.4.0 up to and not including 4.4.0, enabling a maliciously crafted RDS (R Data Serialization) formatted file or R package to run arbitrary code on an end user’s system when interacted with.
{
"affected": [],
"aliases": [
"CVE-2024-27322"
],
"database_specific": {
"cwe_ids": [
"CWE-502"
],
"github_reviewed": false,
"github_reviewed_at": null,
"nvd_published_at": "2024-04-29T13:15:30Z",
"severity": "HIGH"
},
"details": "Deserialization of untrusted data can occur in the R statistical programming language, on any version starting at 1.4.0 up to and not including 4.4.0, enabling a maliciously crafted RDS (R Data Serialization) formatted file or R package to run arbitrary code on an end user\u2019s system when interacted with.",
"id": "GHSA-82x4-8q4x-2qxv",
"modified": "2025-02-13T18:32:28Z",
"published": "2024-04-29T15:30:28Z",
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2024-27322"
},
{
"type": "WEB",
"url": "https://hiddenlayer.com/research/r-bitrary-code-execution"
},
{
"type": "WEB",
"url": "https://https://kb.cert.org/vuls/id/238194"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/7ZLV4OWXZIJ7EFBIWUZADUSHYJTFAQ4D"
},
{
"type": "WEB",
"url": "https://lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/JVE5FDLFJGTAMOSJ6DREFAODEUBRFWSG"
},
{
"type": "WEB",
"url": "https://www.kb.cert.org/vuls/id/238194"
},
{
"type": "WEB",
"url": "http://www.openwall.com/lists/oss-security/2024/04/29/3"
}
],
"schema_version": "1.4.0",
"severity": [
{
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H",
"type": "CVSS_V3"
}
]
}
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.