Unsafe yaml load can lead to remote code execution
The project used yaml.load() to parse YAML documents, which can construct arbitrary Python objects rather than only simple data types. An attacker who can supply a YAML document from an untrusted source could therefore cause arbitrary object construction, which the report frames as leading to remote code execution.
- Triaged in 7 hours
- Fixed in 22 hours
- Disclosed after 17 days
TL;DR Yaml.load() has the ability to construct an arbitrary Python object. This is dangerous if you receive a YAML document from an untrusted source.
Proof of concept https://github.com/liberapay/liberapay.com/blob/master/liberapay/testing/vcr.py#L40
How do I fix it? Always use yaml.safe_load(). This function limits this ability to simple Python objects like integers or lists.
If you have any questions please comment on the report
best regards mrrobot2050
Impact
Yaml.load() has the ability to construct an arbitrary Python object. This is dangerous if you receive a YAML document from an untrusted source.
Attachments

Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
How it worked
Root cause
The code called yaml.load() instead of a safe loader, so the parser was allowed to instantiate arbitrary Python objects described in the input.
Impact
If untrusted YAML reaches this code path, an attacker could achieve remote code execution; the report does not demonstrate this end to end and only points to the unsafe call.
What the attacker needed
Attacker-supplied YAML reaches the parser
The fix
The code should be changed to use yaml.safe_load() so that only simple Python objects such as integers and lists can be produced.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this report has not been written yet. The Original tab links to the source.
YAML is a text format for configuration and data, similar to JSON. The unsafe loading function in the Python YAML library can build Python objects named in the document, not just plain values. If a program parses a YAML file from an untrusted source with that function, it is dangerous.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.