OWASP / OWASP/ASVS

Clarification: 1.3.2 "Sanitized"

Open
#3,232 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

4a) Waiting for another V1 (prev V5)
Dominant language
HTML
Stars
3.6k
Forks
831
Avg merge
7h 55m
Merged PRs (30d)
4

Description

1.3.2 Verify that the application avoids the use of eval() or other dynamic code execution features such as Spring Expression Language (SpEL). Where there is no alternative, any user input being included must be sanitized before being executed.

  • Sanitization can lower the chances of an attack succeeding, but it rarely removes the risk completely. Trying to sanitize executable logic is especially risky and often doesn’t work well. In such cases, validation and strict allowlists are the safer choice.
  • The requirement mixes client-side JavaScript concerns with server-side Java expression evaluation into one vague rule, without clarifying the execution context, programming language, or threat model.
  • Sanitization means removing or modifying dangerous input, but it doesn’t guarantee the input will be interpreted safely. AS the application cannot safely “sanitize” arbitrary user input and then pass it to a code interpreter. In dynamic code execution contexts, sanitization can give a false sense of security. A safer approach is to use strict allowlists or context-limited variables.
  • If the term “sanitized” here actually means strict, context-specific allowlisting and tokenization (and not just generic escaping or string cleaning), that needs to be stated clearly, because it’s not obvious to everyone.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the raw .md source for requirement 1.3.2 in the ASVS 5.0 tree, rather than its derived formats. Review how the requirement describes JavaScript, Spring Expression Language, sanitization, and allowlisting; it is done when the wording clearly defines the execution context, threat model, and intended safety guidance.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, javascript, spring
Domain
documentation, security
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.