Skip to content

BaseURL is misused in templates as it also contains query parameters of the URL #1787

@kakumanivrn

Description

@kakumanivrn

Nuclei version:

Current Version: 2.6.5

Current Behavior:

In nuclei template {{BaseURL}} is taken as full URL along with query parameters. It works in the case only when the input provided is just a root URL without any file extensions or query parameters.

For example when the input is: http://google.com/v2/pages?page=1&page-size=354

For a specific template, the request was made like this:

[VER] [github-workflows-disclosure] Sent HTTP request to http://google.com/v2/pages?page=1&page-size=354/.github/workflows/snyk.yml

The request doesn't make and it cannot find the vulnerability like this. All most all of the templates are using BaseURL rather than RootURL.

Expected Behavior:

BaseURL should consider only the URI path and not the query parameters and also not the filename with extension. For a full URL I would suggest another variable name.

Steps To Reproduce:

Provide input of a URL with query parameters and run templates with {{BaseURL}}

Anything else:

I am not sure if this is intended behaviour. The only case where this is intended behaviour is that Nuclei is designed for web app root level scanning only. If that's the case how can I solve my problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions