- 🔒 Disabled editable relations by default (see advisory) - Naz
View the changelog for full details: v5.24.0...v5.24.1
🪄 Love open source? We're hiring JavaScript Engineers to work on Ghost full-time
Tag Name: v5.24.1
Release Date: 11/28/2022
GhostOpen-source publishing platform specifically designed for professional bloggers and publications. Focuses on clean, minimalist writing and publishing experience.
This release addresses a critical security vulnerability in Ghost's relational data handling. By disabling editable relations by default, Ghost prevents unauthorized users from modifying newsletter settings through the members interface. This update is essential for all Ghost 5.x installations to protect against potential data manipulation vulnerabilities.
This release changes how Bookshelf relations handle editable permissions. If you have custom code that relies on editing related records through Bookshelf relations, you'll need to explicitly mark those relations as editable.
Example of how to define an editable relation:
// Before v5.24.1, relations were editable by default
this.belongsTo('someModel');
// After v5.24.1, you need to explicitly make relations editable
this.belongsTo('someModel', {editable: true});
Review any custom code that modifies related records to ensure it continues to function as expected after this update.
Urgency: Critical
All Ghost installations running version 5.x should update to v5.24.1 immediately to address the security vulnerability. This is a security-focused release with minimal code changes, making it a low-risk update.
To upgrade:
No database migrations are required for this update.
No general bug fixes were included in this security-focused release.
No new features were introduced in this security-focused release.
This release addresses a security vulnerability (GHSA-9gh8-wp53-ccc6) where Bookshelf relations allowed editing of relational records by default. This vulnerability potentially allowed members to edit newsletter settings they shouldn't have access to.
The fix disables editable relations by default, requiring explicit definition for any relation that should be editable. This change:
Credit for discovering this vulnerability goes to Dave McDaniel and other members of Cisco Talos.
No specific performance improvements were included in this release.
This security release addresses a significant vulnerability in Ghost's data model layer that could allow unauthorized modification of newsletter settings through member accounts. By disabling editable relations by default, Ghost now requires explicit permission for any relation that should be able to modify related records.
The change improves the overall security posture of Ghost by preventing unwanted nested saves and creating clearer boundaries around data modification. While this is primarily a security fix, it also represents an architectural improvement in how Ghost handles relational data.
For most users, this update will be transparent with no visible changes to functionality. Developers working with custom code that extends Ghost's models may need to update their code to explicitly enable editable relations where needed.
View the changelog for full details: v5.24.0...v5.24.1
🪄 Love open source? We're hiring JavaScript Engineers to work on Ghost full-time