Skip to content
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

Duplicate 1.12.1 12.4.1 store outside of the web root #1065

Closed
Sjord opened this issue Oct 11, 2021 · 10 comments
Closed

Duplicate 1.12.1 12.4.1 store outside of the web root #1065

Sjord opened this issue Oct 11, 2021 · 10 comments
Assignees
Labels
1) Discussion ongoing Issue is opened and assigned but no clear proposal yet

Comments

@jmanico
Copy link
Member

jmanico commented Oct 12, 2021

I agree. Can we also clean up 12.4.1 while we are here?

@elarlang elarlang added the 3) awaiting proposal There is some discussion in issue and reach to some results but it's not concluded with clear propos label Oct 12, 2021
@elarlang
Copy link
Collaborator

Agree to remove 1.12.1.

12.4.1 - "preferably with strong validation" does not give anything extra.

And even better question is - how it's different from V4 category requirements? In other words - if someone store their files by folder structure in web root, but you can not access them directly with HTTP request, then what is wrong with that solution (argumentation)?

@elarlang elarlang added the 1) Discussion ongoing Issue is opened and assigned but no clear proposal yet label Oct 12, 2021
@jmanico
Copy link
Member

jmanico commented Oct 12, 2021 via email

@elarlang
Copy link
Collaborator

Proposal, as a first step, we can:

  • remove 1.2.1 (as it's implementation requirement and duplicate to 12.4.1)
  • remove from 12.4.1 "preferably with strong validation." (validation it's covered in general with V5.1 requirements and V12.2.1 should cover it)

Then we can rethink about the point of 12.4.1.

@jmanico
Copy link
Member

jmanico commented Oct 15, 2021 via email

elarlang pushed a commit to elarlang/ASVS that referenced this issue Oct 15, 2021
@elarlang
Copy link
Collaborator

For the record and for discussion:

  • 1.2.1 had CWE-522 "CWE-552: Files or Directories Accessible to External Parties"
  • 12.4.1 had CWE-922 "CWE-922: Insecure Storage of Sensitive Information"

For me CWE-522 is better option for current requirement, so I set it for 12.4.1:

Verify that files obtained from untrusted sources are stored outside the web root, with limited permissions.

PR #1073

jmanico added a commit that referenced this issue Oct 15, 2021
@jmanico
Copy link
Member

jmanico commented Oct 15, 2021

Current main is now:

| 1.12.1 | [DELETED, DUPLICATE TO 12.4.1] | | | | |
| 12.4.1 | [MODIFIED] Verify that files obtained from untrusted sources are stored outside the web root, with limited permissions. | ✓ | ✓ | ✓ | 552 |

@elarlang elarlang removed the 3) awaiting proposal There is some discussion in issue and reach to some results but it's not concluded with clear propos label Oct 16, 2021
@elarlang
Copy link
Collaborator

So, duplicate is removed, but I'm not too happy with this requirement. It feels a bit from old-style PHP crappy architecture, where file in public folder leads to RCE.

The main question is, should we just blindly disallow to store files in public folder in general, or make it a bit more flexible.

  • sometimes files are expected to stay in public folder, like "public" images (or we ask them to serve from another domain? is it reasonable?)
  • even if .php file is stored in public folder for "PHP application", it's important to avoid to execute it as PHP program code (by web-server configuration for example)

@jmanico
Copy link
Member

jmanico commented Oct 16, 2021 via email

@elarlang
Copy link
Collaborator

duplicate resolved, for finetuning I opened separate issue #1087

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1) Discussion ongoing Issue is opened and assigned but no clear proposal yet
Projects
None yet
Development

No branches or pull requests

3 participants