Replies: 2 comments 3 replies
-
|
The requirement was made to address exactly those anti-patterns listed here. Encoding data into the storage and not keeping the original form is ruining the integrity of the data.
The problem to solve is to have the correct output encoding. Proposal is an insecure anti-pattern.
The problem to solve here is to use the correct caching mechanism. To ruin the original data to solve the caching problem from one output format is clearly an incorrect solution and an anti-pattern.
See previous comment.
Output encoding must be applied per functionality needs - is there a need to show it as text, or is there a need to let the browser render it.
Disagree. It is vice-versa. |
Beta Was this translation helpful? Give feedback.
-
I assume that The V1.1 rule against storing encoded data applies to the persistent System of Record (the database), while the advice to "use caching" refers to storing rendered/encoded output in a volatile performance layer. This highlights what I believe is a critical clarity gap in the standard: the document itself does not make this architectural distinction explicit. As a result, a development team could misinterpret V1.1's use of the word "stored" as a blanket rule that applies to any form of storage, including caches. This could lead them to avoid a necessary and valid performance optimization pattern. Furthermore, there is a conflict with the practices of major, security-conscious platforms have made a deliberate architectural choice to perform sanitization and rendering on write, storing the resulting safe HTML in their primary database. They do this as a fundamental part of their defense-in-depth and performance strategy. Given this, I would suggest the ASVS team consider (if align) that a future version of the standard should:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
First, thank you for the continued efforts in maintaining and evolving the ASVS — it’s an incredibly valuable resource for the security and development community.
While reviewing section V1.1: Encoding and Sanitization Architecture, I came across the following statement:
The above statement assumes that:
Practical risks of strict raw-data-only storage
Blanket rule to “store raw and never encoded” is risky. Security should balance between defense-in-depth and clear encoding boundaries.
I would be happy know OWASP ASVS team on the above concern.
Beta Was this translation helpful? Give feedback.
All reactions