ep_etherpad-lite: Import/export uses Math.random() for temp file paths; predictable paths on shared /tmp enable symlink-based file overwrite
src/node/handler/ImportHandler.ts and src/node/handler/ExportHandler.ts both compute their temporary working-file paths as: const randNum = Math.floor(Math.random() * 0xFFFFFFFF); const srcFile = ${os.tmpdir()}/etherpad_export_${randNum}.html; const destFile = ${os.tmpdir()}/etherpad_export_${randNum}.${type}; Two flaws compound: Math.random() is not crypto-secure. It yields at most ~32 bits of entropy and is predictable across calls within the same Node process (V8 shares PRNG state between consecutive Math.random() invocations). An attacker on the same host who observes any earlier temp-file name from …