zaproxy / zaproxy/community-scripts

Font file string intepreted as Drupal Hash

Open
#460 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
895
Forks
260
Avg merge
53m
Merged PRs (30d)
1

Description

Describe the bug

False Positive:

Requires Passive Scanning Alpha in order to have the "Information Disclosure - Drupal Hash (Passive 100010).
A woff2 font file (and by extent, other files too?) content may contains strings that would trigger the regex
https://github.com/zaproxy/community-scripts/blob/bf5135a7cd2ebf9994e28ae354a49633c40abd6c/passive/Find%20Hashes.js#L60

Here is what triggered this regex in my case : $½$u°+ºº¥nu÷{ûJ0»2¼ó¬$Ӗ„—ë¾}'d>æüºJV•õmMdŽÒ…öVU<
As far as I know Drupal hashes are alphanumeric only.
Maybe a more restrictive regex like some others in the same file could do the job.

Steps to reproduce the behavior
  1. Have ZAP passive scan analyze a response with the content of a woff2 font file.
  2. If the file happens to contain a string starting with $ followed by a char, then another $ , and whatever 52 other char then the request is going to be tagged as "Information Disclosure - Drupal Hash".
Expected behavior

As the content of a font file has nothing to do with a Drupal hash, this alert should not be raised.

Software versions

ZAP 2.15.0 Desktop

Screenshots

No response

Errors from the zap.log file

No response

Additional context

Passive Scanner Alpha v42.0.0

Would you like to help fix this issue?
  • Yes

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 at passive/Find Hashes.js around line 60, where the Drupal hash detection regex is defined. Review how the pattern matches response content, then verify that a woff2 response no longer triggers the alert while valid Drupal hashes still do; the issue does not name a test file.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
security
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.