~/talk

Serialization formats aren't toys

Talkat PyCon Australia 2014 · 2014-08-01..08-05· [security]
linkedin:tveastman
slides:none on file

APIs that accept XML, YAML or JSON are vulnerable unless the parser is deliberately dumb. YAML parsers like PyYAML will import modules and construct objects so yaml.load vs yaml.safe_load is literally the difference between returned dicts and arbitrary os.system commands. XML supports entity recursion and external entity expansion so a billion laughs (168 million expansion) blows memory and XXE can leak /etc/passwd or probe internal ports. Use libraries like defusedxml or safe parsers and never eval JSON.

AI-written summary · about

  1. 0:00Start
  2. 8:00Parsing YAML
  3. 10:24November 2011
  4. 10:58January 2013
  5. 12:51Disable YAML tag parsing
  6. 14:26Defining entities
  7. 17:47External entities
  8. 21:30How do I protect myself?
  9. 21:59Make the parser stupider
  10. 24:05eval() is not a stupid enough parser.
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.