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

5.1.6 needs added clarity #1553

Closed
jmanico opened this issue Feb 17, 2023 · 12 comments · Fixed by #1871
Closed

5.1.6 needs added clarity #1553

jmanico opened this issue Feb 17, 2023 · 12 comments · Fixed by #1871
Assignees
Labels
5) awaiting PR A proposal hs been accepted and reviewed and we are now waiting for a PR V5 Temporary label for grouping input validation, sanitization, encoding, escaping related requirements _5.0 - prep This needs to be addressed to prepare 5.0

Comments

@jmanico
Copy link
Member

jmanico commented Feb 17, 2023

Suggest change:

5.1.6 [MOVED FROM 1.5.3, LEVEL L2 > L1] Verify that input validation is enforced on a trusted service layer. (C5) 602

to:

5.1.6 [MOVED FROM 1.5.3, LEVEL L2 > L1] Verify that input validation is enforced on a trusted service layer. Avoid client-side validation, which can be easily bypassed. (C5) 602
@elarlang
Copy link
Collaborator

Recommendation sends wrong signal, like client-side validation is bad. It is not bad, just from security point of view, you can not rely on that.

@jmanico
Copy link
Member Author

jmanico commented Feb 17, 2023

How about:

5.1.6 [MOVED FROM 1.5.3, LEVEL L2 > L1] Verify that input validation is enforced on a trusted service layer. Client-side validation, while still useful for other purposes, which can be easily bypassed from a security perspective. (C5) 602

@mgargiullo
Copy link

mgargiullo commented Feb 18, 2023

May I suggest a slight rewrite for clarity:

"Client-side validation, while still useful for other purposes, which can be easily bypassed from a security perspective.
to
"While useful, client-side validation can be easily bypassed and thus is not a valid security treatment."

@elarlang
Copy link
Collaborator

elarlang commented Feb 18, 2023

More food for brain.

We had similar discussion (#1031 (comment)) for access control requirement 4.1.1:

# Description L1 L2 L3 CWE
4.1.1 [MODIFIED] Verify that the application enforces access control rules at a trusted service layer and doesn't rely on controls which an untrusted user could manipulate such as client-side JavaScript. 602

Also, we have a logging requirement that kind of expects, that all input validation is done on the client side, other wise you have a lot of noise to log on the trusted service layer. If input validation is done in the client side, then you have only 2 cases to log as input validation errors:

  • validations on the client-side and server-side are out of sync (bug)
  • someone is trying to manipulate input validation or making an HTTP request without the expected user-interface (browser) - a potential attack attempt
# Description L1 L2 L3 CWE
7.1.3 [MODIFIED] Verify that the application logs security relevant events including successful and failed authentication events, access control failures, deserialization failures, input validation failures and incorrect HTTP requests (including requests with an unexpected HTTP verb). (C5, C7) 778

@elarlang elarlang self-assigned this Mar 9, 2023
@elarlang elarlang added the 1) Discussion ongoing Issue is opened and assigned but no clear proposal yet label Mar 9, 2023
@elarlang
Copy link
Collaborator

elarlang commented Mar 9, 2023

Can we go with something like that?
Verify that input validation is enforced on a trusted service layer. Client-Side input validation is recommended to use for better usability.

or

Verify that input validation is enforced on a trusted service layer. Client-Side input validation is recommended to use for better usability but security can not rely on that.

@elarlang elarlang added the V5 Temporary label for grouping input validation, sanitization, encoding, escaping related requirements label Apr 5, 2023
@tghosth tghosth added _5.0 - prep This needs to be addressed to prepare 5.0 4b Major-rework These issues need to be part of a full chapter rework labels Jul 10, 2023
@elarlang elarlang assigned tghosth and unassigned twright-0x1 Feb 8, 2024
@elarlang elarlang added the 4) proposal for review Issue contains clear proposal for add/change something label Feb 8, 2024
@elarlang
Copy link
Collaborator

elarlang commented Feb 8, 2024

ping @jmanico @tghosth

@elarlang elarlang added the next meeting Filter for leaders label Feb 8, 2024
@jmanico
Copy link
Member Author

jmanico commented Feb 8, 2024

I like it Elar. Small change suggestion:

Verify that input validation is enforced at a trusted server-side layer. While client-side validation improves usability, security must not rely solely on it.

@tghosth
Copy link
Collaborator

tghosth commented Feb 8, 2024

Minor change:

(We wanted to move away from the "server-side" expression).

Verify that the application is designed to enforce input validation at a trusted service layer. While client-side validation improves usability, security must not rely on it.

This should be added to the new section described here: #1484 (comment)

Should also add an entry to recommendations:

Client-side input validation should be enforced along with the validation at a trusted service layer as this provides a good opportunity to discover when someone has bypassed client-side controls in an attempt to attack the application.

@tghosth
Copy link
Collaborator

tghosth commented Feb 8, 2024

@elarlang

@tghosth tghosth removed 1) Discussion ongoing Issue is opened and assigned but no clear proposal yet josh/elar next meeting Filter for leaders 4b Major-rework These issues need to be part of a full chapter rework labels Feb 8, 2024
@tghosth
Copy link
Collaborator

tghosth commented Feb 15, 2024

@elarlang to create the PR

@elarlang elarlang added 5) awaiting PR A proposal hs been accepted and reviewed and we are now waiting for a PR and removed 4) proposal for review Issue contains clear proposal for add/change something labels Feb 15, 2024
@tghosth
Copy link
Collaborator

tghosth commented Feb 18, 2024

Should also add an entry to recommendations:

Client-side input validation should be enforced along with the validation at a trusted service layer as this provides a good opportunity to discover when someone has bypassed client-side controls in an attempt to attack the application.

I have done this with: 6b92836

@tghosth
Copy link
Collaborator

tghosth commented Feb 18, 2024

Otherwise I think we are good on this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5) awaiting PR A proposal hs been accepted and reviewed and we are now waiting for a PR V5 Temporary label for grouping input validation, sanitization, encoding, escaping related requirements _5.0 - prep This needs to be addressed to prepare 5.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants