-
-
Notifications
You must be signed in to change notification settings - Fork 680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion: V14.4.2 - move or change - serving content as attachment #721
Comments
Agreed ; good call.
…--
Jim Manico
@manicode
On Feb 22, 2020, at 10:54 PM, Elar Lang ***@***.***> wrote:
V14.4.2 Verify that all API responses contain Content-Disposition: attachment; filename="api.json" (or other appropriate filename for the content type).
As it is API specific, move this requirement to V13.2
(goal V4.1)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Marking for 4.1 |
We're ready for a PR on this @elarlang |
With current wording it makes sense to move it, but maybe we should review and generalize the wording instead. I don't know how to wordsmith it - idea is, if some content/file is not meant to be displayed and executed in browser as part of used application functionality, it must be served as attachment. Also related to requirement:
Far away from requirement proposal, open for discussion. |
My instinct says something closer to: V12.5.2 Verify that uploaded files cannot execute active web content such as HTML/JavaScript content. Maybe? Bah this is tough. |
I agree it looks more fit to 13.2 than 14.4 @elarlang There are some similarities to V12.5.2 but I think they are different. However, I'm more concerned about the reason of this requirement. Are there other reasons I'm missing or threats that this requirement mitigate? |
If you force browser to send content as attachment on direct access, then the content-type can be text/html and it will be not executed in browser. From that perspective 14.4.2 and 12.5.2 serve the same goal as well. |
Note: This is the earliest commit I have found: https://github.com/OWASP/ASVS/blame/45a586e09711d1c2585a572f1839cb72b7950b4d/4.0/en/0x22-V14-Config.md#L78 For RFD solution (quite off-topic)I prefer this straightforward solution: https://hackerone.com/reports/39658"fix the issue with content being returned for extensions that aren't supported" because application shouldn't serve the resource/content/extension that does not exist. |
@elarlang Solution to both issue is adding "Content-Disposition header" but the perspectives are different. I personally don't think we should merge them. |
RFD part is covered with #726 and from that perspective current 14.4.2 is duplicate for 12.3.4>12.5.3 I was more focused on this mime type part from your linked commit and there is some common area with 12.5.2. |
Othen I watch this serving as attachment as 2nd layer of defence, when API serves JSON content with text/html content-type (and with current wording for the 14.4.2 it was pointing clearly only for API). Anyway, with current issue - I think I (or we) need to analyze it a bit more and make it clear, why exactly this requirement exists. |
Per #1004 we are going to delete 14.2.2 there is no need for this requirement in modern browsers anymore. |
14.4.2 deleted |
Is there any requirement to say, that "API responses must not be accessible directly" and/or response from API can not be with |
As it is API specific, move this requirement to V13.2
(goal ASVS v4.1)
The text was updated successfully, but these errors were encountered: