Impact
The PagesRouter static file serving route is vulnerable to a path traversal attack that allows unauthenticated reading of files outside the configured pagesPath directory. The boundary check uses a string prefix comparison without enforcing a directory separator boundary. An attacker can use path traversal sequences to access files in sibling directories whose names share the same prefix as the pages directory (e.g. pages-secret starts with pages).
This affects any Parse Server deployment with the pages feature enabled (pages.enableRouter: true). Exploitation requires a sibling directory of pagesPath whose name begins with the same string as the pages directory name.
Patches
The fix enforces a path separator boundary in the check, ensuring resolved paths must be strictly inside the pagesPath directory.
Workarounds
Ensure the pagesPath directory has no sibling directories whose names begin with the same prefix. For example, if pagesPath is /srv/pages, ensure no directory like /srv/pages-backup or /srv/pages_old exists alongside it.
References
Impact
The
PagesRouterstatic file serving route is vulnerable to a path traversal attack that allows unauthenticated reading of files outside the configuredpagesPathdirectory. The boundary check uses a string prefix comparison without enforcing a directory separator boundary. An attacker can use path traversal sequences to access files in sibling directories whose names share the same prefix as the pages directory (e.g.pages-secretstarts withpages).This affects any Parse Server deployment with the
pagesfeature enabled (pages.enableRouter: true). Exploitation requires a sibling directory ofpagesPathwhose name begins with the same string as the pages directory name.Patches
The fix enforces a path separator boundary in the check, ensuring resolved paths must be strictly inside the
pagesPathdirectory.Workarounds
Ensure the
pagesPathdirectory has no sibling directories whose names begin with the same prefix. For example, ifpagesPathis/srv/pages, ensure no directory like/srv/pages-backupor/srv/pages_oldexists alongside it.References