CVE-2023-40034: Github.com/woodpecker ci/woodpecker Woodpecker Does Not Validate Webhook Vulnerability

HIGH
Advisory Identifier: GHSA-4gcf-5m39-98mc
CVSS 8.1
CWE-20
Published
Advisory Summary

CVE-2023-40034 is a HIGH (CVSS 8.1) woodpecker does not validate webhook vulnerability (CWE-20: Improper Input Validation) affecting Github.com/woodpecker ci/woodpecker libraries in the Go ecosystem. The issue involves woodpecker does not validate webhook before changing any data. Remediation is available by upgrading affected packages to version 1.0.2.

CVE-2023-40034 at a Glance

CVE Identifier CVE-2023-40034
GHSA Identifier GHSA-4gcf-5m39-98mc
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-20: Improper Input Validation
Affected Product Github.com/woodpecker ci/woodpecker
Package Ecosystem Go
Published Date
Last Updated

Security Impact

CVSS: 8.1

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required None (PR:N)
User Interaction None (UI:N)
Scope Unchanged (S:U)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2023-40034

To remediate this vulnerability, upgrade all affected Github.com/woodpecker ci/woodpecker dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/woodpecker-ci/woodpecker fixed: 1.0.2
Upgrade github.com/woodpecker-ci/woodpecker to 1.0.2
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/woodpecker-ci/woodpecker

How to Check if You Are Affected

To determine whether your application is affected by CVE-2023-40034, inspect your project dependencies for Github.com/woodpecker ci/woodpecker:

inspect dependencies for github.com/woodpecker-ci/woodpecker

Analyze the terminal output to locate any version of Github.com/woodpecker ci/woodpecker in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.2), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-20: Improper Input Validation, where the product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly. In Github.com/woodpecker ci/woodpecker, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Impact An attacker can post malformed webhook data which leads to an update of the repository data that can e.g. allow the takeover of a repository. This is only critical if the CI is configured for public usage and connected to a forge witch is also in public usage. ### Patches Please use either next or the latest v1.0 e.g. v1.0.2 ### Workarounds Secure the CI system by making it inaccessible to untrusted entities, for example, by placing it behind a firewall. ### References Fix: https://github.com/woodpecker-ci/woodpecker/pull/2221 Backport: https://github.com/woodpecker-ci/woodpecker/pull/2222

CVE-2023-40034 Affected Github.com/woodpecker ci/woodpecker Versions

1 component(s)
Fixed Versions:
1.0.2
Product / Package Ecosystem Affected Versions Fixed Version
github.com/woodpecker-ci/woodpecker
Go
≥ 1.0.0
< 1.0.2
1.0.2

References

Frequently Asked Questions

What is CVE-2023-40034?
CVE-2023-40034 is a security vulnerability in Github.com/woodpecker ci/woodpecker involving Woodpecker does not validate webhook before changing any data under CWE-20: Improper Input Validation.
Which Github.com/woodpecker ci/woodpecker versions are affected?
Affected versions include releases prior to 1.0.2 across affected packages: github.com/woodpecker-ci/woodpecker.
What version fixes CVE-2023-40034?
Upgrading to 1.0.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/woodpecker-ci/woodpecker affected?
Yes, github.com/woodpecker-ci/woodpecker is affected in releases prior to 1.0.2. Upgrade your dependency to 1.0.2 or later.
What is the CVSS score of CVE-2023-40034?
CVE-2023-40034 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2023-40034?
CVE-2023-40034 is classified under CWE-20: Improper Input Validation (The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.).
How can I check Go dependencies for CVE-2023-40034?
Run the dependency tree command: 'inspect dependencies for github.com/woodpecker-ci/woodpecker'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-4gcf-5m39-98mc",
  "modified" : "2023-08-18T14:25:07Z",
  "published" : "2023-08-16T21:02:29Z",
  "aliases" : [ "CVE-2023-40034" ],
  "summary" : "Woodpecker does not validate webhook before changing any data",
  "details" : "### Impact\nAn attacker can post malformed webhook data which leads to an update of the repository data that can e.g. allow the takeover of a repository.\nThis is only critical if the CI is configured for public usage and connected to a forge witch is also in public usage.\n\n### Patches\nPlease use either next or the latest v1.0 e.g. v1.0.2\n\n### Workarounds\nSecure the CI system by making it inaccessible to untrusted entities, for example, by placing it behind a firewall.\n\n### References\nFix: https://github.com/woodpecker-ci/woodpecker/pull/2221\nBackport: https://github.com/woodpecker-ci/woodpecker/pull/2222",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/woodpecker-ci/woodpecker"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.0.0"
      }, {
        "fixed" : "1.0.2"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/woodpecker-ci/woodpecker/security/advisories/GHSA-4gcf-5m39-98mc"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2023-40034"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/woodpecker-ci/woodpecker/pull/2221"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/woodpecker-ci/woodpecker/pull/2222"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/woodpecker-ci/woodpecker/commit/6e4c2f84cc84661d58cf1c0e5c421a46070bb105"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/woodpecker-ci/woodpecker"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/woodpecker-ci/woodpecker/releases/tag/v1.0.2"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2023-08-16T21:02:29Z",
    "nvd_published_at" : "2023-08-16T21:15:10Z"
  }
}