52 Commits

Author SHA1 Message Date
Doğan Can Bakır 1ec64a3f95 chore(deps): bump pdsec modules; switch to projectdiscovery/govaluate and aurora v4
Bumps clistats, fastdialer, retryablehttp-go, dsl, networkpolicy,
ratelimit, sarif, utils, wappalyzergo, cdncheck. dsl v0.8.18 moves to
the projectdiscovery/govaluate fork, and utils v0.11.0 pulls aurora v4,
so the corresponding imports and type references are migrated.

Refs #7380.
2026-05-18 17:14:29 +03:00
Doğan Can Bakır 10831d6188 fix lint 2026-05-06 12:28:15 +03:00
Dogan Can Bakir 0e67be77bc fix DAST skipping URLs with part: request and mode: multiple (#7326) 2026-04-15 05:21:32 +07:00
Dogan Can Bakir c8a9853ff1 Merge pull request #7125 from usernametooshort/fix/time-delay-missing-custom-headers
fix(fuzz): propagate custom headers to time_delay analyzer follow-up requests
2026-03-24 21:14:10 +03:00
Mzack9999 c2f3397fa4 fix(fuzz): concurrent map writes in multipart form parsing (#7291) 2026-03-24 17:43:27 +07:00
Mzack9999 18ab9175cf adding tests 2026-03-24 00:24:11 +01:00
Mzack9999 29ae75b7dc adding interface 2026-03-20 14:18:29 +01:00
Mzack9999 199c0e4d00 Merge remote-tracking branch 'origin/dev' into pr/7164 2026-03-20 14:13:57 +01:00
Ahmed Elgharabawy 0ae6d9040c fix(fuzz): use actual parameter for frequency dedupe (#7037)
Fix numeric path fuzz dedupe by using actualParameter for frequency
checks and add regression tests for numeric index and actual value
behavior.
2026-03-20 04:14:16 +01:00
Youssef Nagy 67e880691b fix(fuzz): prevent path mutation across sequential Rebuild calls (#6398) (#7253)
* fix(fuzz): prevent path mutation across sequential Rebuild calls (#6398)

retryablehttp.Request.Clone() shares the URL pointer, so when
Rebuild() calls UpdateRelPath() on the cloned request it mutates
q.req.URL.Path. On subsequent Rebuild() calls the original path
segments are wrong, causing corrupted fuzz requests (especially
visible with numeric path parts like /user/55/profile).

Snapshot the original path during Parse() and use the snapshot in
Rebuild() instead of reading from the mutable request.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* remove embedded URL field

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Mzack9999 <mzack9999@protonmail.com>
2026-03-20 02:40:18 +01:00
XiKi-Home e38953da4a fix: address CodeRabbit review feedback 2026-03-11 00:29:12 +01:00
ZachL111 ef4bb2273d fix(fuzz): fix URI detection, duplicate type attr, and missing urlAttrs 2026-03-09 08:21:57 -07:00
ZachL111 2b3cb3e74d fix(fuzz): fix godoc comments on package-level vars 2026-03-09 07:58:25 -07:00
ZachL111 a22ead4acb fix(fuzz): add missing event handlers and strip MIME params from script type 2026-03-09 07:42:36 -07:00
ZachL111 0d5dc6d8d9 fix(fuzz): fix error propagation and remove dead code in XSS analyzer 2026-03-09 07:28:05 -07:00
ZachL111 049b4f2a84 fix(fuzz): address edge cases in XSS context analyzer 2026-03-09 06:56:02 -07:00
ZachL111 0d4c4cb6de feat(fuzz): add XSS reflection context analyzer
Implements context-aware XSS reflection analysis for the nuclei fuzzing
engine, addressing issue #5838. Uses golang.org/x/net/html tokenizer
for robust context detection across 8 injection contexts including
javascript: URIs, non-executable script blocks, srcdoc attributes,
event handlers, style blocks, and HTML comments.

All 48 tests pass with comprehensive table-driven coverage including
malformed HTML, empty inputs, and case-insensitive matching.
Zero modifications to existing files.
2026-03-09 06:18:16 -07:00
leo 63e5492ce3 ci: integrate typos spell checker into CI workflow
Add the crate-ci/typos GitHub Action to automatically catch spelling
errors in future PRs. This includes:

- New `.github/workflows/typos.yaml` workflow that runs on pushes to
  dev, pull requests, and manual dispatch
- `_typos.toml` configuration to suppress false positives from
  non-English READMEs, test fixtures, certificate data, CLI flag
  short names, and intentional identifiers
- Fix genuine typos found by the tool:
  - `PostReuestsHandlerRequest` -> `PostRequestsHandlerRequest`
  - `fiter` -> `filter`
  - `thant` -> `that`
  - `seperate` -> `separate`
  - `ExludedDastTmplStats` -> `ExcludedDastTmplStats`
  - `splitted` -> `split` (local variables)
  - `formated` -> `formatted` (local variables)
  - Rename `worflow_loader.go` -> `workflow_loader.go`

Fixes #6532
2026-03-08 22:11:26 -04:00
usernametooshort 2d8e4031cc fix(time-delay): propagate custom headers to follow-up delay requests
The time_delay analyzer's reqSender rebuilt follow-up requests from
gr.Component.Rebuild() which clones the component's base request.  That
base request is parsed from rule.BaseRequest *before* post-parse header
injection happens (custom -H flags, auth provider headers, cookies).
As a result every follow-up request was sent without the headers that the
original triggering request carried, including Cookie/Authorization —
the server rejected them or ran the SQL in an unauthenticated context.

Fix: after Rebuild(), copy the complete header set from gr.Request (the
original fuzz-generated request, which has all headers) into the rebuilt
request.  This mirrors the same approach used everywhere else in the
request pipeline and makes the time_delay analyzer behave consistently.

Fixes #7106
2026-03-05 19:40:13 +01:00
Dwi Siswanto c27c47420f chore: golangci-lint run --fix ./...
Signed-off-by: Dwi Siswanto <git@dw1.io>
2026-02-26 22:03:14 +07:00
Doğan Can Bakır ef650defb6 Revert "fix(lint): use fmt.Fprintf for remaining WriteString(fmt.Sprintf(...)) calls"
This reverts commit 10421e9d00.
2026-02-26 14:45:25 +03:00
Doğan Can Bakır 10421e9d00 fix(lint): use fmt.Fprintf for remaining WriteString(fmt.Sprintf(...)) calls 2026-02-25 15:34:45 +03:00
Yusei Kasahara 50e3131d86 fix(fuzz): prevent concurrent map writes in evaluateVarsWithInteractsh (#6828)
Clone the data map before modification to prevent race conditions when
multiple goroutines call evaluateVarsWithInteractsh concurrently with
a shared map.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-17 11:08:14 +07:00
Mzack9999 c73906b405 Merge pull request #6691 from stringscut/dev
chore: execute goimports to format the code
2025-12-15 14:37:56 +04:00
Dwi Siswanto cf3b5bf449 fix: body loss on retries/redirects in remaining paths (#6693)
Continue the fix from #6666 by converting
remaining direct Body assignments to use setter
methods:

* pkg/fuzz/component/body.go:139: use
  `SetBodyReader()` in transfer-encoding path.
* pkg/protocols/http/request.go:694: use
  `SetBodyString()` in fuzz component `Rebuild()`.

Fixes #6692.

Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-12-13 22:37:39 +07:00
stringscut 7fb1fe7bf2 chore: execute goimports to format the code
Signed-off-by: stringscut <stringscut@outlook.jp>
2025-12-12 15:10:22 +08:00
Patrick Stoeckle bfef42f9e3 chore(typos): fix typos 2025-10-10 17:32:54 +02:00
Dwi Siswanto d2cf69aebb feat(fuzz): enhance MultiPartForm with metadata APIs (#6486)
* feat(fuzz): enhance `MultiPartForm` with metadata APIs

* add `SetFileMetadata`/`GetFileMetadata` APIs for
  file metadata management.
* implement RFC-2046 boundary validation
  (max 70 chars).
* add boundary validation in `Decode` method.

* fix `filesMetadata` initialization.
* fix mem leak by removing defer from file reading
  loop.
* fix file metadata overwriting by storing first
  file's metadata instead of last.

Closes #6405, #6406

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore(fuzz): satisfy lint errs

Signed-off-by: Dwi Siswanto <git@dw1.io>

---------

Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-09-22 22:09:24 +05:30
Dwi Siswanto a1b5a0ed99 fix(fuzz): handles duplicate multipart form field names (#6404)
* fix: handle duplicate field names in multipart form encoding

* fix(fuzz): handles `[]any` type in `*MultiPartForm.Encode`

Signed-off-by: Dwi Siswanto <git@dw1.io>

* test(fuzz): adds panic recovery & display encoded out

Signed-off-by: Dwi Siswanto <git@dw1.io>

* fix(fuzz): incorrectly treated mixed type field

in `*MultiPartForm.Encode`

Signed-off-by: Dwi Siswanto <git@dw1.io>

* test(fuzz): refactor compare w decoded instead

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore(fuzz): prealloc for `[]any` type

Signed-off-by: Dwi Siswanto <git@dw1.io>

* fix(fuzz): treats nil value as empty string

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore(fuzz): rm early error return for non-array file

Signed-off-by: Dwi Siswanto <git@dw1.io>

* test(fuzz): adds `TestMultiPartFormFileUpload` test

Signed-off-by: Dwi Siswanto <git@dw1.io>

---------

Signed-off-by: Dwi Siswanto <git@dw1.io>
Co-authored-by: yusei-wy <31252054+yusei-wy@users.noreply.github.com>
2025-08-25 13:42:51 +05:30
Tarun Koyalwar 19247ae74b Path-Based Fuzzing SQL fix (#6400)
* setup claude

* migrate to using errkit

* fix unused imports + lint errors

* update settings.json

* fix url encoding issue

* fix lint error

* fix the path fuzzing component

* fix lint error
2025-08-25 13:36:58 +05:30
Sandeep Singh b4644af80a Lint + test fixes after utils dep update (#6393)
* fix: remove undefined errorutil.ShowStackTrace

* feat: add make lint support and integrate with test

* refactor: migrate errorutil to errkit across codebase

- Replace deprecated errorutil with modern errkit
- Convert error declarations from var to func for better compatibility
- Fix all SA1019 deprecation warnings
- Maintain error chain support and stack traces

* fix: improve DNS test reliability using Google DNS

- Configure test to use Google DNS (8.8.8.8) for stability
- Fix nil pointer issue in DNS client initialization
- Keep production defaults unchanged

* fixing logic

* removing unwanted branches in makefile

---------

Co-authored-by: Mzack9999 <mzack9999@protonmail.com>
2025-08-20 05:28:23 +05:30
Dwi Siswanto 6a6fa4d38f feat(fuzz): eval variables (#6358)
* feat(fuzz): eval vars for rule keys & values

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore: re-fmt fuzzing/dast errors

Signed-off-by: Dwi Siswanto <git@dw1.io>

* test(fuzz): adds `TestEvaluateVariables`

Signed-off-by: Dwi Siswanto <git@dw1.io>

---------

Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-08-16 14:41:22 +05:30
HD Moore f26996cb89 Remove singletons from Nuclei engine (continuation of #6210) (#6296)
* introducing execution id

* wip

* .

* adding separate execution context id

* lint

* vet

* fixing pg dialers

* test ignore

* fixing loader FD limit

* test

* fd fix

* wip: remove CloseProcesses() from dev merge

* wip: fix merge issue

* protocolstate: stop memguarding on last dialer delete

* avoid data race in dialers.RawHTTPClient

* use shared logger and avoid race conditions

* use shared logger and avoid race conditions

* go mod

* patch executionId into compiled template cache

* clean up comment in Parse

* go mod update

* bump echarts

* address merge issues

* fix use of gologger

* switch cmd/nuclei to options.Logger

* address merge issues with go.mod

* go vet: address copy of lock with new Copy function

* fixing tests

* disable speed control

* fix nil ExecuterOptions

* removing deprecated code

* fixing result print

* default logger

* cli default logger

* filter warning from results

* fix performance test

* hardcoding path

* disable upload

* refactor(runner): uses `Warning` instead of `Print` for `pdcpUploadErrMsg`

Signed-off-by: Dwi Siswanto <git@dw1.io>

* Revert "disable upload"

This reverts commit 114fbe6663.

* Revert "hardcoding path"

This reverts commit cf12ca800e.

---------

Signed-off-by: Dwi Siswanto <git@dw1.io>
Co-authored-by: Mzack9999 <mzack9999@protonmail.com>
Co-authored-by: Dwi Siswanto <git@dw1.io>
Co-authored-by: Dwi Siswanto <25837540+dwisiswant0@users.noreply.github.com>
2025-07-10 01:17:26 +05:30
Dwi Siswanto 87ed0b2bb9 build: bump all direct modules (#6290)
* chore: fix non-constant fmt string in call

Signed-off-by: Dwi Siswanto <git@dw1.io>

* build: bump all direct modules

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore(hosterrorscache): update import path

Signed-off-by: Dwi Siswanto <git@dw1.io>

* fix(charts): break changes

Signed-off-by: Dwi Siswanto <git@dw1.io>

* build: pinned `github.com/zmap/zcrypto` to v0.0.0-20240512203510-0fef58d9a9db

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore: golangci-lint auto fixes

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore: satisfy lints

Signed-off-by: Dwi Siswanto <git@dw1.io>

* build: migrate `github.com/xanzy/go-gitlab` => `gitlab.com/gitlab-org/api/client-go`

Signed-off-by: Dwi Siswanto <git@dw1.io>

* feat(json): update build constraints

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore: dont panicking on close err

Signed-off-by: Dwi Siswanto <git@dw1.io>

---------

Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-07-01 00:40:44 +07:00
huochexizhan 3a3f5e271c fix: fix incorrect nil return value (#6079)
Signed-off-by: huochexizhan <huochexizhan@outlook.com>
2025-03-03 16:19:16 +05:30
Ice3man 5f0b7eb19b feat: added initial live DAST server implementation (#5772)
* feat: added initial live DAST server implementation

* feat: more logging + misc additions

* feat: auth file support enhancements for more complex scenarios + misc

* feat: added io.Reader support to input providers for http

* feat: added stats db to fuzzing + use sdk for dast server + misc

* feat: more additions and enhancements

* misc changes to live server

* misc

* use utils pprof server

* feat: added simpler stats tracking system

* feat: fixed analyzer timeout issue + missing case fix

* misc changes fix

* feat: changed the logics a bit + misc changes and additions

* feat: re-added slope checks + misc

* feat: added baseline measurements for time based checks

* chore(server): fix typos

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix(templates): potential DOM XSS

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* fix(authx): potential NIL deref

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

* feat: misc review changes

* removed debug logging

* feat: remove existing cookies only

* feat: lint fixes

* misc

* misc text update

* request endpoint update

* feat: added tracking for status code, waf-detection & grouped errors (#6028)

* feat: added tracking for status code, waf-detection & grouped errors

* lint error fixes

* feat: review changes + moving to package + misc

---------

Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>

* fix var dump (#5921)

* fix var dump

* fix dump test

* Added filename length restriction for debug mode (-srd flag) (#5931)

Co-authored-by: Andrey Matveenko <an.matveenko@vkteam.ru>

* more updates

* Update pkg/output/stats/waf/waf.go

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: sandeep <8293321+ehsandeep@users.noreply.github.com>
Co-authored-by: Dwi Siswanto <25837540+dwisiswant0@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: Dogan Can Bakir <65292895+dogancanbakir@users.noreply.github.com>
Co-authored-by: 9flowers <51699499+Lercas@users.noreply.github.com>
Co-authored-by: Andrey Matveenko <an.matveenko@vkteam.ru>
Co-authored-by: Sandeep Singh <sandeep@projectdiscovery.io>
2025-02-13 18:46:28 +05:30
Dwi Siswanto 622c5503fa perf(*): replace encoding/json w/ sonic or go-json (fallback) (#6019)
* perf(*): replace `encoding/json` w/ sonic

Signed-off-by: Dwi Siswanto <git@dw1.io>

* feat(utils): add `json` pkg (sonic wrapper)

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore(*): use `sonic` wrapper instead

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore(*): replace `sonic.ConfigStd` -> `json` (wrapper)

Signed-off-by: Dwi Siswanto <git@dw1.io>

* test(model): adjust expected marshal'd JSON

Signed-off-by: Dwi Siswanto <git@dw1.io>

* feat(json): dynamic backend; `sonic` -> `go-json` (fallback)

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore(json): merge config - as its not usable

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore(json): rm go version constraints

Signed-off-by: Dwi Siswanto <git@dw1.io>

* chore: go mod tidy

Signed-off-by: Dwi Siswanto <git@dw1.io>

---------

Signed-off-by: Dwi Siswanto <git@dw1.io>
2025-02-11 03:01:37 +05:30
Ice3man b046f7686f feat: Added time based delay analyzer to fuzzing implementation (#5781)
* feat: added fuzzing output enhancements

* changes as requested

* misc

* feat: added dfp flag to display fuzz points + misc additions

* feat: added support for fuzzing nested path segments

* feat: added parts to fuzzing requests

* feat: added tracking for parameter occurence frequency in fuzzing

* added cli flag for fuzz frequency

* fixed broken tests

* fixed path based sqli integration test

* feat: added configurable fuzzing aggression level for payloads

* fixed failing test

* feat: added analyzers implementation for fuzzing

* feat: misc changes to analyzer

* feat: misc additions of units + tests fix

* misc changes to implementation
2024-11-19 11:51:32 +05:30
Ice3man 82680980a5 bugfix: fix multipart panic + support for filename + content-type (#5702)
* bugfix: fix multipart files panic + support for filename + content-type propagation

* misc changes
2024-10-10 20:22:22 +05:30
Dwi Siswanto aac1af1308 refactor(fuzz): use mapsutil.Map type (#5558)
* refactor(fuzz): use `mapsutil.Map` type

Signed-off-by: Dwi Siswanto <git@dw1.io>

* fix(headless): handle empty `key` in `*Value.SetParsedValue`

Signed-off-by: Dwi Siswanto <git@dw1.io>

* feat(fuzz): add type assertion checks

Signed-off-by: Dwi Siswanto <git@dw1.io>

---------

Signed-off-by: Dwi Siswanto <git@dw1.io>
2024-08-28 12:41:02 +05:30
Ramana Reddy f29b94521e fix unresolved variables in dast templates (#5443)
* fix unresolved variables in dast templates

* dedupe interactsh urls

* misc update
2024-08-16 18:19:44 +05:30
Ramana Reddy 33dbb51505 fix unresolved interactsh-url variable with fuzzing (#5289)
* fix unresolved interactsh variable with fuzzing

* fix variables override with fuzzing
2024-07-26 00:01:05 +05:30
Ice3man 9f3f7fce06 Fuzzing additions & enhancements (#5139)
* feat: added fuzzing output enhancements

* changes as requested

* misc

* feat: added dfp flag to display fuzz points + misc additions

* feat: added support for fuzzing nested path segments

* feat: added parts to fuzzing requests

* feat: added tracking for parameter occurence frequency in fuzzing

* added cli flag for fuzz frequency

* fixed broken tests

* fixed path based sqli integration test

* feat: added configurable fuzzing aggression level for payloads

* fixed failing test
2024-06-11 04:43:46 +05:30
Ice3man 9784ca860a feat: added fuzzing output enhancements (#5126)
* feat: added fuzzing output enhancements

* changes as requested

* misc
2024-05-03 18:46:28 +05:30
Ramana Reddy bf0cae3a10 Fix panic with fuzz template (#5068)
* Fix panic with fuzz template

* Fix multiple mode in fuzzing

* Add test
2024-04-23 13:39:35 +05:30
Tarun Koyalwar 74dee426ed fuzz: fix missing expression evaluation before use (#5019) 2024-04-09 00:58:35 +05:30
Tarun Koyalwar b86fcb5546 fix index out of range error (#4998) 2024-04-08 14:11:32 +05:30
Ramana Reddy 8c27ca2591 fix(schema): generation of missing JSON schema definitions (#4995)
* fix(schema): generation of missing JSON schema definitions

* make headers and data to accept multi-type inputs

* misc update
2024-04-08 03:29:42 +05:30
Tarun Koyalwar 255032f4f2 pre-condition in code , fuzz and other misc updates (#4966)
* fuzz: rename 'filters' -> 'pre-condition'

* code proto: pre-condition + integration test

* feat: dsl document generator

* update dsl page header

* fix lint error

* add js defined helper funcs in docs

* remove panic recovery unless its for third party(go-rod,goja)

* handle dynamic values flattening edgecase in flow+multiprotocol

* fix order of kv in form-data (failing test)

* fix template loading counters

* Revert "handle dynamic values flattening edgecase in flow+multiprotocol"

This reverts commit 58fdd4faf7.

* fix flow iteration using 'iterate'
2024-04-01 19:18:21 +05:30
Tarun Koyalwar e88889b263 add -dast flag and multiple bug fixes for dast templates (#4941)
* add default get method

* remove residual payload logic from old implementation

* fuzz: clone current state of component

* fuzz: bug fix stacking of payloads in multiple mode

* improve stdout template loading stats

* stdout: force display warnings if no templates are loaded

* update flags in README.md

* quote non-ascii chars in extractor output

* aws request signature can only be used in signed & verified tmpls

* deprecate request signature

* remove logic related to deprecated fuzzing input

* update test to use ordered params

* fix interactsh-url lazy eval: #4946

* output: skip unnecessary updates when unescaping

* updates as per requested changes
2024-03-29 13:31:30 +05:30