libreoffice-convert vulnerable to path traversal / arbitrary file write
Moderate severity
GitHub Reviewed
Published
Jul 4, 2026
in
elwerene/libreoffice-convert
•
Updated Aug 27, 2026
Description
Published to the GitHub Advisory Database
Aug 27, 2026
Reviewed
Aug 27, 2026
Last updated
Aug 27, 2026
Impact
options.fileName is used to build a filesystem path
(path.join(tempDir.name, fileName)) and the caller-supplied document buffer is
written there, but fileName is never reduced to a base name. A fileName containing
"../" escapes the temporary directory, so a caller can write arbitrary content to an
arbitrary path the process can write to (e.g. ~/.ssh/authorized_keys, an /etc/cron.d
entry, or a web root).
Patches
Version 1.8.2 uses
path.basenameonfilenameto make sure the temp directory can not be escaped.Workarounds
Make sure you supply the filename yourself and don't have it user supplied or use
path.basenameonfilenamebefore using it inlibreoffice-convert.References