Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

golang.org/x/net/publicsuffix vulnerability #75175

Closed as not planned
Closed as not planned
@ownthink

Description

Go version

v0.43.0

Output of go env in your module/workspace:

GOVERSION='go1.24.3'

What did you do?

package main
import (
	"fmt"
	"golang.org/x/net/publicsuffix"
)
func main() {
	subdomain := "www.kaikou.city.yokohama.jp"
	domain, _ := publicsuffix.EffectiveTLDPlusOne(subdomain)
	suffix, icann := publicsuffix.PublicSuffix(domain)
	
	fmt.Println("subdomain", subdomain, "domain", domain, "suffix", suffix, "icann", icann)
}

What did you see happen?

when I was using the publicsuffix library, I found that the suffix list contains *.yokohama.jp, !city.yokohama.jp and the jp suffix.

If I parse www.kaikou.city.yokohama.jp, the * wildcard should first match city.yokohama.jp as the suffix, but since !city.yokohama.jp excludes that suffix, the library returns yokohama.jp. However, yokohama.jp is not explicitly listed in the suffix list.

suffix yokohama.jp not in https://publicsuffix.org/list/public_suffix_list.dat

Could you confirm whether this issue occurs across all of the following lists?

*.ck
!www.ck
*.kawasaki.jp
!city.kawasaki.jp
*.kitakyushu.jp
!city.kitakyushu.jp
*.kobe.jp
!city.kobe.jp
*.nagoya.jp
!city.nagoya.jp
*.sapporo.jp
!city.sapporo.jp
*.sendai.jp
!city.sendai.jp
*.yokohama.jp
!city.yokohama.jp
sub.psl.hrsn.dev
*.wc.psl.hrsn.dev
!ignored.wc.psl.hrsn.dev
*.sub.wc.psl.hrsn.dev
!ignored.sub.wc.psl.hrsn.dev

What did you expect to see?

domain: yokohama.jp
suffix: jp

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

        AltStyle によって変換されたページ (->オリジナル) /