CVE-2025-68274: Sipgo Missing Nil Check To Header

Directly accessing the `Params` map on a potentially absent SIP header via `.To()` or the internal `.to` field without first validating that the header is not nil can cause a nil pointer dereference. This leads to a panic and a Denial of Service (DoS) condition. Extract the header to a local variable and check if it is nil before accessing `.Params`.

Provally CuratedPublic repositoryHighMedium confidenceVerifiedApache-2.0Go
greprules fetch cve-2025-68274-sipgo-missing-nil-check-to-header --engine opengrep

Description

Directly accessing the `Params` map on a potentially absent SIP header via `.To()` or the internal `.to` field without first validating that the header is not nil can cause a nil pointer dereference. This leads to a panic and a Denial of Service (DoS) condition. Extract the header to a local variable and check if it is nil before accessing `.Params`.