nuclei: signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x1b6c1d6

Hi, I get this error using the latest version of Nuclei from MacBook Pro 2019

Nuclei Engine 2.8.1 (latest) Nuclei Templates 9.3.0 (latest)

[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0x1b6c1d6]

goroutine 1481646 [running]:
github.com/projectdiscovery/nuclei/v2/pkg/input.(*Helper).convertInputToType(0xc0024b6028, {0xc00afe0d00, 0xc8}, 0x4, {0x0, 0x0})
	github.com/projectdiscovery/nuclei/v2/pkg/input/input.go:72 +0x96
github.com/projectdiscovery/nuclei/v2/pkg/input.(*Helper).Transform(0x1046973?, {0xc00afe0d00?, 0x8?}, 0x1304efd?)
	github.com/projectdiscovery/nuclei/v2/pkg/input/input.go:43 +0x7f
github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/executer.(*Executer).Execute(0xc0021b0d60, 0xc0033c2940)
	github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/executer/executer.go:75 +0x2c6
github.com/projectdiscovery/nuclei/v2/pkg/core.(*Engine).executeModelWithInput.func2.1(0x132a226?, 0x0?, 0xc0033c2800)
	github.com/projectdiscovery/nuclei/v2/pkg/core/execute.go:146 +0x182
created by github.com/projectdiscovery/nuclei/v2/pkg/core.(*En
	github.com/projectdiscovery/nuclei/v2/pkg/core/execute.go:131 +0x745

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 1
  • Comments: 20 (10 by maintainers)

Most upvoted comments

@ehsandeep already fixed with https://github.com/projectdiscovery/nuclei/tree/issue-2979-url-panic

echo 'https://~^(.*-pre)\.smth\.google\.com/' | go run . -id tech-detect      

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v2.8.1

		projectdiscovery.io

[INF] Using Nuclei Engine 2.8.1 (latest)
[INF] Using Nuclei Templates 9.3.1 (latest)
[INF] Templates added in last update: 2
[INF] Templates loaded for scan: 1
[INF] Targets loaded for scan: 1
[INF] No results found. Better luck next time!
tarun@Taruns-MacBook-Pro:~/reviews/nuclei/v2/cmd/nuclei(issue-2979-url-panic○) » 

@tarunKoyalwar @vzamanillo @Ice3man543 from https://github.com/projectdiscovery/nuclei/issues/2996

$ echo 'https://~^(.*-pre)\.smth\.google\.com/' | nuclei -id tech-detect -silent

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x28 pc=0x10343eb48]

goroutine 59 [running]:
github.com/projectdiscovery/nuclei/v2/pkg/input.(*Helper).convertInputToType(0x1400052c028, {0x14002439f50, 0x26}, 0x4, {0x0, 0x0})
	github.com/projectdiscovery/nuclei/v2/pkg/input/input.go:72 +0x68
github.com/projectdiscovery/nuclei/v2/pkg/input.(*Helper).Transform(0x1400053a608?, {0x14002439f50?, 0x1400053a5a8?}, 0x1029abde8?)
	github.com/projectdiscovery/nuclei/v2/pkg/input/input.go:43 +0x88
github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/executer.(*Executer).Execute(0x14001ef83e0, 0x14002449400)
	github.com/projectdiscovery/nuclei/v2/pkg/protocols/common/executer/executer.go:75 +0x298
github.com/projectdiscovery/nuclei/v2/pkg/core.(*Engine).executeModelWithInput.func2.1(0x0?, 0x0?, 0x14002449360)
	github.com/projectdiscovery/nuclei/v2/pkg/core/execute.go:146 +0x148
created by github.com/projectdiscovery/nuclei/v2/pkg/core.(*Engine).executeModelWithInput.func2
	github.com/projectdiscovery/nuclei/v2/pkg/core/execute.go:131 +0x618

@ehsandeep I am able to reproduce the issue. I am using alpine linux docker container which installs the latest version of go (apk add go) and Nuclei as per Nuclei documentation.

% nuclei -H "User-Agent:non-generic-ua" -H "customheader:boolean" -list nuclei_hosts_to_scan_final.txt -t /usr/nucl
ei-templates -o scan-vulnerabilities.txt
[INF] Using Nuclei Engine 2.8.1 (latest)                                                                                                
[INF] Using Nuclei Templates 9.3.0 (latest)

panic: runtime error: invalid memory address or nil pointer dereference                                                                       
[signal SIGSEGV: segmentation violation code=0x1 addr=0x28 pc=0xf684b6]                                                                       
                                                                                                                                              
goroutine 47 [running]:                                                                                                                       
github.com/projectdiscovery/nuclei/v2/pkg/input.(*Helper).convertInputToType(0xc000128a18, {0xc009174120, 0x25}, 0x4, {0x0, 0x0})

@Teicu , I have uploaded fix along with other edge cases to issue-2979-url-panic branch . can you try installing nuclei again with following command

go install -v  github.com/projectdiscovery/nuclei/v2/cmd/nuclei@issue-2979-url-panic 

and share if you are facing same issue .