Soft-Deleted Object Access
Verify that soft-deleted objects disappear for everyone except an authorized restore path, instead of lingering behind a stale check
Use when: the product marks objects deleted without removing them, such as trash, archive or recycle behaviour
Avoid when: deletion is hard and immediate with no tombstone state to inspect
Procedure
- Confirm the product soft-deletes by deleting one of your own labeled objects and observing that it still resolves by identifier.
- Attempt reads on the deleted object as the owner, as a peer account and unauthenticated, recording each status.
- Test whether the object still appears in lists, exports, search results and caches after deletion.
- Check write and restore operations: can a peer restore, modify or duplicate your deleted object?
- Look for stale copies in related endpoints such as versions, comments or attachments linked to the deleted parent.
- Record the deletion model, including whether references to deleted objects return null, error or residual data.
Signals
- A deleted object still returns 200 for the owner through a direct identifier while hidden from lists.
- A peer account can read or restore a deleted object belonging to the other test account.
- Deleted content remains visible through a related endpoint such as comments, versions or attachments.
- Search or export results still contain the deleted object's labeled data.
Patterns
1. Lifecycle check
delete -> GET by id as owner=200 (tombstone), as peer=404/403, unauth=401
lists=absent, export=absent, search=absent
2. Related endpoints
parent deleted, child endpoint /api/items/{id}/comments still returns data
-> residual access via relation
3. Result row
object=ORDER-ALPHA-001 deleted=true owner_read=200 peer_read=404 peer_restore=403
Pitfalls
- Checking only list endpoints, which hide the object while direct identifier access still works.
- Testing only the owner's view, missing the peer-access question entirely.
- Forgetting related objects, where the parent's deletion does not cascade to derived endpoints.
Done when
- Read, write, restore, list, export and related-endpoint behaviour is recorded for a deleted object across all three credential states.
- Residual access paths are documented with the exact endpoint that leaks them.
References
1---2name: soft-deleted-object-access3description: "Verify that soft-deleted objects disappear for everyone except an authorized restore path, instead of lingering behind a stale check. Use when the product marks objects deleted without removing them, such as trash, archive or recycle behaviour"4pack: authzmap5version: 1.0.06category: api-security7tags: [deletion, lifecycle, object-level]8metadata:9 source: https://skillmd.com/skills/wsh7ash/soft-deleted-object-access10---1112# Soft-Deleted Object Access1314> Verify that soft-deleted objects disappear for everyone except an authorized restore path, instead of lingering behind a stale check1516**Use when:** the product marks objects deleted without removing them, such as trash, archive or recycle behaviour1718**Avoid when:** deletion is hard and immediate with no tombstone state to inspect1920## Procedure21221. Confirm the product soft-deletes by deleting one of your own labeled objects and observing that it still resolves by identifier.232. Attempt reads on the deleted object as the owner, as a peer account and unauthenticated, recording each status.243. Test whether the object still appears in lists, exports, search results and caches after deletion.254. Check write and restore operations: can a peer restore, modify or duplicate your deleted object?265. Look for stale copies in related endpoints such as versions, comments or attachments linked to the deleted parent.276. Record the deletion model, including whether references to deleted objects return null, error or residual data.2829## Signals3031- A deleted object still returns 200 for the owner through a direct identifier while hidden from lists.32- A peer account can read or restore a deleted object belonging to the other test account.33- Deleted content remains visible through a related endpoint such as comments, versions or attachments.34- Search or export results still contain the deleted object's labeled data.3536## Patterns3738**1. Lifecycle check**3940```text41delete -> GET by id as owner=200 (tombstone), as peer=404/403, unauth=40142lists=absent, export=absent, search=absent43```4445**2. Related endpoints**4647```text48parent deleted, child endpoint /api/items/{id}/comments still returns data49-> residual access via relation50```5152**3. Result row**5354```text55object=ORDER-ALPHA-001 deleted=true owner_read=200 peer_read=404 peer_restore=40356```5758## Pitfalls5960- Checking only list endpoints, which hide the object while direct identifier access still works.61- Testing only the owner's view, missing the peer-access question entirely.62- Forgetting related objects, where the parent's deletion does not cascade to derived endpoints.6364## Done when6566- Read, write, restore, list, export and related-endpoint behaviour is recorded for a deleted object across all three credential states.67- Residual access paths are documented with the exact endpoint that leaks them.6869## References7071- [OWASP API Security Top 10](https://owasp.org/www-project-api-security/)72- [OWASP Web Security Testing Guide](https://owasp.org/www-project-web-security-testing-guide/)