dtao
safe_yaml
Ruby2013–2014
dtao / safe_yaml
safe_yaml
Parse YAML safely
5Distinct people
5Mentions
0Explicit recommenders
218GitHub stars
What to know before exploring
What it is
Parse YAML safely
GitHub
Where it is used
No documented product use has been verified yet.
What people are saying
No recommendation phrase was found in the indexed comments.
No classified warning is attached to this page. Read the discussions before treating silence as approval.
Also in these discussions
No other repository is repeatedly linked in the same discussions.
This week on Hacker News
Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 5:04:57 PM UTC.
No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.
Mentions over time
HN mentions by month5 dated mentions
Observed mentions: 2013-01-31 19:29:46 UTC to 2014-03-02 08:31:51 UTC.
Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.
View mention counts and date ranges
| Period | Start (UTC) | End (exclusive, UTC) | Mentions | Submissions | Comments |
|---|---|---|---|---|---|
| Jan 2013 | 2013-01-01 00:00:00 UTC | 2013-02-01 00:00:00 UTC | 2 | 1 | 1 |
| Feb 2013 | 2013-02-01 00:00:00 UTC | 2013-03-01 00:00:00 UTC | 2 | 0 | 2 |
| Mar 2013 | 2013-03-01 00:00:00 UTC | 2013-04-01 00:00:00 UTC | 0 | 0 | 0 |
| Apr 2013 | 2013-04-01 00:00:00 UTC | 2013-05-01 00:00:00 UTC | 0 | 0 | 0 |
| May 2013 | 2013-05-01 00:00:00 UTC | 2013-06-01 00:00:00 UTC | 0 | 0 | 0 |
| Jun 2013 | 2013-06-01 00:00:00 UTC | 2013-07-01 00:00:00 UTC | 0 | 0 | 0 |
| Jul 2013 | 2013-07-01 00:00:00 UTC | 2013-08-01 00:00:00 UTC | 0 | 0 | 0 |
| Aug 2013 | 2013-08-01 00:00:00 UTC | 2013-09-01 00:00:00 UTC | 0 | 0 | 0 |
| Sep 2013 | 2013-09-01 00:00:00 UTC | 2013-10-01 00:00:00 UTC | 0 | 0 | 0 |
| Oct 2013 | 2013-10-01 00:00:00 UTC | 2013-11-01 00:00:00 UTC | 0 | 0 | 0 |
| Nov 2013 | 2013-11-01 00:00:00 UTC | 2013-12-01 00:00:00 UTC | 0 | 0 | 0 |
| Dec 2013 | 2013-12-01 00:00:00 UTC | 2014-01-01 00:00:00 UTC | 0 | 0 | 0 |
| Jan 2014 | 2014-01-01 00:00:00 UTC | 2014-02-01 00:00:00 UTC | 0 | 0 | 0 |
| Feb 2014 | 2014-02-01 00:00:00 UTC | 2014-03-01 00:00:00 UTC | 0 | 0 | 0 |
| Mar 2014 | 2014-03-01 00:00:00 UTC | 2014-04-01 00:00:00 UTC | 1 | 0 | 1 |
What Hacker News says
5 sourcesHAharshreality·Mar 2, 2014
> As Stormbrew already pointed out, we already have a format that is ideal for configurations (and sure, data exchange, why not), and it is called yaml.
Unfortunately YAML for untrusted input and data exchange is unsafe by default, depending on the language and implementation. A flag might need to be set, or extra modules included like SafeYAML[1] to keep Yaml from instantiating arbitrary objects.
[1] https://github.com/dtao/safe_yaml
In JSON5 is a proposed extension to JSONAssuming you and your parent are both coyly referring to the recent YAML parsing related Ruby and Rails vulnerabilities, I think the analogy is better than you realize. Raw strcat is to the built-in YAML parser as strncat is to the various whitelist-based YAML fixes[1]. Both strcat and the YAML parser work as intended, but should never be exposed to data controlled by an external source. Buffer overflows aren't intentional, but uses of strcat are, even when they are wrong.
1. https://github.com/dtao/safe_yaml
In Libcurl remote code executionI suggest Rails people have a look at safe_yaml which (now) replaces YAML.load by a safe (safer?) version:
https://github.com/dtao/safe_yaml
(nb: I've enable it on apps without issues)
In On Python security amidst recent Rails/YAML vulnerabilitiesThis is currently being discussed on https://github.com/tenderlove/psych/issues/119
There is also https://github.com/dtao/safe_yaml (hat tip @patio11, who also points out that this has not been audited for completeness/correctness)
In What The Rails Security Issue Means For Your Startup