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

Query automerge not supported in headless mode #3919

Closed
iambouali opened this issue Jul 10, 2023 · 4 comments · Fixed by #3958
Closed

Query automerge not supported in headless mode #3919

iambouali opened this issue Jul 10, 2023 · 4 comments · Fixed by #3958
Assignees
Labels
headless Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.

Comments

@iambouali
Copy link

iambouali commented Jul 10, 2023

When scanning the provided URL, it appears that query automerge is not supported in headless mode. This limitation affects the ability to automatically determine whether to append an XSS payload using an ampersand (&) or a question mark (?) when dealing with URLs like https://host.com/test/ and https://host.com/test/?param=1.

Context

Query automerge is a crucial feature that determines the appropriate delimiter to use when appending an XSS payload to URLs. The presence or absence of existing query parameters should influence the choice between & and ? as the delimiter.

Expected Behavior

In headless mode, the scanning process should support query automerge and correctly determine the appropriate delimiter to use based on the presence or absence of existing query parameters.

Steps to Reproduce

  • Access the URL: https://xxxxxx.oastify.com/?test=1 in headless mode.

  • Observe that query automerge is not supported and the delimiter for appending an XSS payload is not determined correctly.

Captura_de_pantalla_2023-07-08_a_las_19 05 33

Template example

id: poc

info:
  name: poc
  author: poc
  severity: medium
  tags: poc

headless:
  - steps:
      - args:
          url: '{{BaseURL}}/?{{aa}}="><pwnd>'
        action: navigate
      - action: waitload

    payloads:
      aa:
        - xss
echo https://example.com/testing?a=b | nuclei -t aa.yaml -headless -p http://127.0.0.1:8080 -v

Results into:

https://example.com/testing?a=b/?xss=%22%3E%3Cpwnd%3E

Expected:

https://example.com/testing?a=b&xss=%22%3E%3Cpwnd%3E
@iambouali iambouali added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Jul 10, 2023
@iambouali
Copy link
Author

Hello @ehsandeep - Do you have an ETA for when the fix for this issue will be implemented?

@tarunKoyalwar
Copy link
Member

@iambouali , PR for this is raised along with some improvements

@ehsandeep ehsandeep added the Status: Completed Nothing further to be done with this issue. Awaiting to be closed. label Jul 28, 2023
@ehsandeep ehsandeep added this to the nuclei v2.9.10 milestone Jul 28, 2023
@ehsandeep
Copy link
Member

@iambouali now fixed with the latest release.

@iambouali
Copy link
Author

Yay, awesome news! Good job team, @tarunKoyalwar and @ehsandeep :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
headless Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants