The vulnerability allowed a low-privilege user to read attachments from any base by crafting a special request. This was due to a missing ownership check in the readAttachment tool. The patch addresses this by adding a baseId to various data structures and using context-specific database models. This ensures that all data access operations are scoped to the user's current base. The key changes are in packages/nocodb/src/db/BaseModelSqlv2/nested-link-preparator.ts and packages/nocodb/src/db/BaseModelSqlv2.ts, where the code now uses childContext, parentContext, and mmContext to ensure that linked records are accessed within the correct base. While the function readAttachment is not directly modified in the patch, the underlying database models that it uses are now secure.