GHSA-xf6w-q65w-4f2w: Npm/apostrophe vulnerability
Impact Even though it is correctly applied to guests, contributors, etc., viewRole is not applied to the general public. This means that a secured content type like @apostrophecms/user can in theory be accessed.
This is greatly mitigated by the fact that there is no automatic public REST API for any content type. One has to expressly allow it. However, it does mean that developers can make the mistake of setting up a relationship between a content type like a blog post, and @apostrophecms/user. This could potentially expose some sensitive information if templates were written poorly, e.g. if they JSON-serialized the entire object. Note that password hashes are NOT affected because they reside in a separate collection.
The public demo project and its various flavors must be updated first because it inadvertently relies on the bug.
Patches 4.33.0
Workarounds Never create relationships with @apostrophecms/user that are intended for non-admin display. If you need a relationship that expresses authorship, create a separate author piece type to publicly represent that.
Affected Software
Event History
Frequently Asked Questions
Who is exposed to this issue?
Exposure requires an application to explicitly make a content type available through a public REST API and to relate publicly displayed content, such as blog posts, to @apostrophecms/user. Risk increases if templates serialize or otherwise expose the full related user object.
Are password hashes exposed?
No. Password hashes are stored in a separate collection and are not affected by this issue.
What can be done if upgrading is not immediately possible?
Do not create relationships to @apostrophecms/user for non-admin display. For public authorship or similar metadata, use a separate author piece type instead.
What version contains the fix?
The issue is patched in version 4.33.0.