Skip to content

build(deps): bump github.com/go-chi/chi/v5 from 5.2.1 to 5.2.2 #7086

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Jun 20, 2025

Bumps github.com/go-chi/chi/v5 from 5.2.1 to 5.2.2.

Release notes

Sourced from github.com/go-chi/chi/v5's releases.

v5.2.2

What's Changed

Security fix

  • Fixes GHSA-vrw8-fxc6-2r93 - "Host Header Injection Leads to Open Redirect in RedirectSlashes" commit
    • a lower-severity Open Redirect that can't be exploited in browser or email client, as it requires manipulation of a Host header
    • reported by Anuraag Baishya, @​anuraagbaishya. Thank you!

New Contributors

Full Changelog: go-chi/chi@v5.2.1...v5.2.2

Commits

Dependabot compatibility score

You can trigger a rebase of this PR by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot dependabot bot added dependencies Pull requests that update a dependency file go Pull requests that update Go code labels Jun 20, 2025
@CLAassistant
Copy link

CLAassistant commented Jun 20, 2025

CLA assistant check
All committers have signed the CLA.

@nocive
Copy link

nocive commented Jun 24, 2025

Fixes GHSA-vrw8-fxc6-2r93

@mohammed90
Copy link
Member

FWIW, Caddy isn't affected by the mentioned vuln.

Bumps [github.com/go-chi/chi/v5](https://github.com/go-chi/chi) from 5.2.1 to 5.2.2.
- [Release notes](https://github.com/go-chi/chi/releases)
- [Changelog](https://github.com/go-chi/chi/blob/master/CHANGELOG.md)
- [Commits](go-chi/chi@v5.2.1...v5.2.2)

---
updated-dependencies:
- dependency-name: github.com/go-chi/chi/v5
  dependency-version: 5.2.2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/go_modules/github.com/go-chi/chi/v5-5.2.2 branch from 3c0d34d to 46aa03a Compare June 26, 2025 16:14
@nilzona
Copy link

nilzona commented Jul 21, 2025

I am getting hit by security scans on a caddy-server based repo, the reported issue will be fixed by this one. Is there a problem with merging this one?

@mohammed90
Copy link
Member

I am getting hit by security scans on a caddy-server based repo, the reported issue will be fixed by this one. Is there a problem with merging this one?

There isn't much of a blocker besides us configuring an SLA exception for dependabot and merging the PR. However, for Caddy, the security alert is a false-positive. Caddy isn't affected by the vuln in Chi due to how we're using it. The Host-header routing is completely managed by Caddy before passing off the request to Chi.

Out of curiosity, which scanner is flagging this? The standard vuln scanner of Go is govulncheck, which we have in our CI, isn't flagging this vuln as impacting us.

@nocive
Copy link

nocive commented Jul 21, 2025

@mohammed90 docker image scanners like trivy or docker scout are flagging this (among other things):

usr/bin/caddy (gobinary)

Total: 5 (UNKNOWN: 0, LOW: 1, MEDIUM: 3, HIGH: 1, CRITICAL: 0)

┌─────────────────────────────┬─────────────────────┬──────────┬────────┬───────────────────┬─────────────────┬──────────────────────────────────────────────────────────────┐
│           Library           │    Vulnerability    │ Severity │ Status │ Installed Version │  Fixed Version  │                            Title                             │
├─────────────────────────────┼─────────────────────┼──────────┼────────┼───────────────────┼─────────────────┼──────────────────────────────────────────────────────────────┤
│ github.com/cloudflare/circl │ GHSA-2x5j-vhc8-9cwm │ LOW      │ fixed  │ v1.6.0            │ 1.6.1           │ CIRCL-Fourq: Missing and wrong validation can lead to        │
│                             │                     │          │        │                   │                 │ incorrect results                                            │
│                             │                     │          │        │                   │                 │ https://github.com/advisories/GHSA-2x5j-vhc8-9cwm            │
├─────────────────────────────┼─────────────────────┼──────────┤        ├───────────────────┼─────────────────┼──────────────────────────────────────────────────────────────┤
│ github.com/go-chi/chi/v5    │ GHSA-vrw8-fxc6-2r93 │ MEDIUM   │        │ v5.2.1            │ 5.2.2           │ chi Allows Host Header Injection which Leads to Open         │
│                             │                     │          │        │                   │                 │ Redirect in RedirectSlashes...                               │
│                             │                     │          │        │                   │                 │ https://github.com/advisories/GHSA-vrw8-fxc6-2r93            │
├─────────────────────────────┼─────────────────────┼──────────┤        ├───────────────────┼─────────────────┼──────────────────────────────────────────────────────────────┤
│ stdlib                      │ CVE-2025-22874      │ HIGH     │        │ v1.24.3           │ 1.24.4          │ crypto/x509: Usage of ExtKeyUsageAny disables policy         │
│                             │                     │          │        │                   │                 │ validation in crypto/x509                                    │
│                             │                     │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-22874                   │
│                             ├─────────────────────┼──────────┤        │                   ├─────────────────┼──────────────────────────────────────────────────────────────┤
│                             │ CVE-2025-0913       │ MEDIUM   │        │                   │ 1.23.10, 1.24.4 │ Inconsistent handling of O_CREATE|O_EXCL on Unix and Windows │
│                             │                     │          │        │                   │                 │ in os in syscall...                                          │
│                             │                     │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-0913                    │
│                             ├─────────────────────┤          │        │                   │                 ├──────────────────────────────────────────────────────────────┤
│                             │ CVE-2025-4673       │          │        │                   │                 │ net/http: Sensitive headers not cleared on cross-origin      │
│                             │                     │          │        │                   │                 │ redirect in net/http                                         │
│                             │                     │          │        │                   │                 │ https://avd.aquasec.com/nvd/cve-2025-4673                    │
└─────────────────────────────┴─────────────────────┴──────────┴────────┴───────────────────┴─────────────────┴──────────────────────────────────────────────────────────────┘

@nilzona
Copy link

nilzona commented Jul 21, 2025

I can't link to the scan since it's inside a private repo, but the tool being used is twistlock

some details about the error:

"twistlock": {
      "result": "failure",
      "data": {
        "state": "failure",
        "message": "",
        "hasWarnings": false,
        "results": [
          {
            "distro": "Alpine Linux v3.22",
            "complianceScanPassed": true,
            "complianceDistribution": {
              "critical": 0,
              "high": 0,
              "low": 0,
              "medium": 0,
              "total": 0
            },
            "vulnerabilities": [
              {
                "discoveredDate": "2025-07-21T07:08:15Z",
                "fixDate": "2025-06-20T20:31:03Z",
                "graceDays": -1,
                "id": "GHSA-vrw8-fxc6-2r93",
                "impactedVersions": [
                  "\u003e=v0",
                  "\u003cv5.2.2"
                ],
                "layerInstruction": "COPY /usr/bin/caddy /bin/caddy # buildkit",
                "layerTime": "2025-07-09T11:29:12Z",
                "link": "https://github.com/go-chi/chi/security/advisories/GHSA-vrw8-fxc6-2r93",
                "packageName": "github.com/go-chi/chi/v5",
                "packagePath": "/bin/caddy",
                "packageVersion": "v5.2.1",
                "riskFactors": [
                  "Has fix",
                  "Medium severity"
                ],
                "severity": "medium",
                "status": "fixed in 5.2.2",
                "whitelisted": false
              },
            ],
            "vulnerabilityDistribution": {
              "critical": 0,
              "high": 0,
              "low": 2,
              "medium": 1,
              "total": 3
            },
            "vulnerabilityScanPassed": false,
          }
        ]
      }

@mohammed90
Copy link
Member

I see. So as mentioned earlier, the vulnerable code is not reachable or effective in the case of Caddy due to how we use Chi. Most vuln scanners are naive and don't take execution path in consideration. For Go ecosystem, the Go team provides a tool that properly takes execution path in consideration, which they discuss in their blog post Vulnerability Management for Go.

We use govulncheck in CI. It doesn't report the referenced vuln. This proves the issue doesn't impact Caddy. Scout and Trivy are more naive in their analysis, so they flag any mention of the package within a binary, regardless of the execution path, which merely adds burden without effective security gain. To react to their reports merely to silence them gives legitimacy to false warnings. Nothing stops them from yelling about completely unrelated vulns. Scout and Trivy are open-source, and we can give them feedback on their tools. In fact, Trivy is able to take the output of govulncheck into consideration for reporting when invoked in a specific way. For Twistlock, we cannot give them that feedback. If you're a customer of theirs, share the feedback with them.

We'll eventually merge the PR and upgrade the reported package, but understand that with this upgrade or not, the vuln is not possible in Caddy at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants