Skip to content
Medium 5.3

documents.export writes the archive into the anonymously served public bucket when the document title contains path traversal (FILE_STORAGE=local)

GHSA-2jfj-rch9-whf4 First seen on SecPulse

Summary

Summary

FileOperation.getExportKey builds the storage key for an export archive by interpolating the document title straight into a path string. A member who titles a document ../../../public/<uuid>/<uuid>/x gets the archive written into the public bucket instead of uploads, and `files...

Affected packages

PackageAffected → Fixed
otherOutline
< 1.10.0→ 1.10.0
Original description The description as published by the source.

Summary

FileOperation.getExportKey builds the storage key for an export archive by interpolating the document title straight into a path string. A member who titles a document ../../../public///x gets the archive written into the public bucket instead of uploads, and files.get serves anything in that bucket with no authentication at all.

The archive covers the document and every child under it, so the member can first copy anything they can read underneath the crafted parent. The result is an anonymous, unlisted, unrevocable download URL for workspace content, which is exactly what the sharing controls exist to prevent.

This affects FILE_STORAGE=local, the value shipped in .env.sample.

Details

server/models/FileOperation.ts:

static getExportKey({ name, teamId, format }) {
  return `${Buckets.uploads}/${teamId}/${uuidv4()}/${name}-export.${format.replace(/outline-/, "")}.zip`;
}

Its call site is server/routes/api/documents/documents.ts:855, which passes name: document.titleWithDefault. Titles are free text up to 100 characters and are never path sanitised.

getKeyForFileOp in server/commands/collectionExporter.ts:23 is the same expression again, with collection?.name || team.name in place of the title. collections.export reaches it with a collection name a member chose, so the bug has two entry points.

The contrast worth noting is AttachmentHelper.getKey, which builds an upload key the same way and does pass the result thro…

Source: GitHub Repository Security Advisories (Game のスタック) GitHub Advisory OSV

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details