Listen to this Post
CVE-2020-14343 exploits a flaw in PyYAML’s deserialization process when using the yaml.FullLoader. This loader allows the execution of arbitrary Python code through crafted YAML tags. In affected docling-core versions (2.21.0 to 2.48.3), the `load_from_yaml()` method uses PyYAML for parsing. If PyYAML is below version 5.4, and untrusted YAML data is passed to this method, an attacker can inject malicious tags like !!python/object/apply:os.system. These tags trigger constructors that run system commands during deserialization, leading to remote code execution. The vulnerability stems from FullLoader’s permissive nature, which does not restrict dangerous constructors. The fix involves switching to yaml.SafeLoader, which sanitizes input and prevents code execution. Upgrading PyYAML to 5.4+ also patches the CVE by defaulting to safer loading.
Platform: docling-core
Version: 2.21.0-2.48.3
Vulnerability: Remote Code Execution
Severity: Critical
date: 2020-08-20
Prediction: 2020-08-31
What Undercode Say:
Analytics:
- Check versions: `pip show docling-core pyyaml`
– Vulnerable code: `DoclingDocument.load_from_yaml(untrusted_data)`
– Malicious YAML: `!!python/object/apply:os.system [“id”]`
How Exploit:
Craft YAML with `!!python/object/apply` tags.
Inject into `load_from_yaml()` method.
Execute arbitrary commands remotely.
Protection from this CVE
Upgrade docling-core to 2.48.4.
Use PyYAML version 5.4+.
Switch to `yaml.SafeLoader`.
Impact:
Remote Code Execution.
System compromise.
Data theft.
🎯Let’s Practice Exploiting & Learn Patching For Free:
Sources:
Reported By: github.com
Extra Source Hub:
Undercode

