CVE-2021-43286

Source
https://cve.org/CVERecord?id=CVE-2021-43286
Import Source
https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-43286.json
JSON Data
https://api.osv.dev/v1/vulns/CVE-2021-43286
Published
2022-04-14T13:15:11.417Z
Modified
2026-07-09T05:45:26.601445Z
Severity
  • 8.8 (High) CVSS_V3 - CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H CVSS Calculator
Summary
[none]
Details

An issue was discovered in ThoughtWorks GoCD before 21.3.0. An attacker with privileges to create a new pipeline on a GoCD server can abuse a command-line injection in the Git URL "Test Connection" feature to execute arbitrary code.

References

Affected packages

Git / github.com/gocd/gocd

Affected ranges

Type
GIT
Repo
https://github.com/gocd/gocd
Events
Introduced
0 Unknown introduced commit / All previous commits are affected
Fixed
Fixed
Fixed
Database specific
Show details
{
    "cpe": "cpe:2.3:a:thoughtworks:gocd:*:*:*:*:*:*:*:*",
    "extracted_events": [
        {
            "introduced": "0"
        },
        {
            "fixed": "21.3.0"
        }
    ],
    "source": [
        "CPE_RANGE",
        "REFERENCES"
    ]
}

Affected versions

14.*
14.2.0
14.3.0
14.4.0
15.*
15.1.0
15.2.0
15.3.0
16.*
16.1.0
16.10.0
16.11.0
16.12.0
16.2.0
16.3.0
16.4.0
16.5.0
16.6.0
16.7.0
16.8.0
16.9.0
17.*
17.1.0
17.10.0
17.11.0
17.12.0
17.2.0
17.3.0
17.4.0
17.5.0
17.6.0
17.7.0
17.8.0
17.9.0
18.*
18.1.0
18.10.0
18.11.0
18.12.0
18.2.0
18.3.0
18.4.0
18.5.0
18.6.0
18.7.0
18.8.0
18.9.0
19.*
19.1.0
19.10.0
19.11.0
19.12.0
19.2.0
19.3.0
19.4.0
19.5.0
19.6.0
19.7.0
19.8.0
19.9.0
20.*
20.1.0
20.10.0
20.2.0
20.3.0
20.4.0
20.5.0
20.6.0
20.7.0
20.8.0
20.9.0
21.*
21.1.0
21.2.0

Database specific

vanir_signatures_modified
"2026-07-09T05:45:26Z"
vanir_signatures
[
    {
        "id": "CVE-2021-43286-01ae8c9f",
        "deprecated": false,
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "length": 641.0,
            "function_hash": "124596372966629212065225234818018196834"
        },
        "source": "https://github.com/gocd/gocd/commit/2b77b533abcbb79c8fc758dec9984305dc1ade42",
        "target": {
            "function": "rejectsObviouslyWrongURL",
            "file": "config/config-api/src/test/java/com/thoughtworks/go/config/materials/mercurial/HgMaterialConfigTest.java"
        }
    },
    {
        "id": "CVE-2021-43286-03cd671a",
        "deprecated": false,
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "194036998780502449636620104054355612583",
                "102185130105415049436833166402650538597",
                "230774063661433871759965625403981245089",
                "141509106629205929764396453188029215915"
            ]
        },
        "source": "https://github.com/gocd/gocd/commit/2b77b533abcbb79c8fc758dec9984305dc1ade42",
        "target": {
            "file": "config/config-api/src/main/java/com/thoughtworks/go/util/command/UrlArgument.java"
        }
    },
    {
        "id": "CVE-2021-43286-21caea98",
        "deprecated": false,
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "219630219189222351856822635018625230521",
                "48876913343932304597560776308317625649",
                "132981623954863675996697750276752572097",
                "320621157394402341962125858392135330104"
            ]
        },
        "source": "https://github.com/gocd/gocd/commit/2b77b533abcbb79c8fc758dec9984305dc1ade42",
        "target": {
            "file": "config/config-api/src/test/java/com/thoughtworks/go/config/materials/git/GitMaterialConfigTest.java"
        }
    },
    {
        "id": "CVE-2021-43286-385ba612",
        "deprecated": false,
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "66581283155267295146163814183101083778",
                "285404883148074073003322921897660682841"
            ]
        },
        "source": "https://github.com/gocd/gocd/commit/6fa9fb7a7c91e760f1adc2593acdd50f2d78676b",
        "target": {
            "file": "config/config-api/src/test/java/com/thoughtworks/go/util/command/UrlArgumentTest.java"
        }
    },
    {
        "id": "CVE-2021-43286-3ab94890",
        "deprecated": false,
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "length": 633.0,
            "function_hash": "243234070517793177723484309838190985373"
        },
        "source": "https://github.com/gocd/gocd/commit/2b77b533abcbb79c8fc758dec9984305dc1ade42",
        "target": {
            "function": "rejectsObviouslyWrongURL",
            "file": "config/config-api/src/test/java/com/thoughtworks/go/config/materials/svn/SvnMaterialConfigTest.java"
        }
    },
    {
        "id": "CVE-2021-43286-3af19a6b",
        "deprecated": false,
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "length": 351.0,
            "function_hash": "202969805385369586734208223744178519399"
        },
        "source": "https://github.com/gocd/gocd/commit/6fa9fb7a7c91e760f1adc2593acdd50f2d78676b",
        "target": {
            "function": "checkConnection",
            "file": "domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java"
        }
    },
    {
        "id": "CVE-2021-43286-426f78f3",
        "deprecated": false,
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "length": 305.0,
            "function_hash": "169683593483086120118895555106859491629"
        },
        "source": "https://github.com/gocd/gocd/commit/6fa9fb7a7c91e760f1adc2593acdd50f2d78676b",
        "target": {
            "function": "validateConcreteScmMaterial",
            "file": "config/config-api/src/main/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfig.java"
        }
    },
    {
        "id": "CVE-2021-43286-4d360d81",
        "deprecated": false,
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "length": 601.0,
            "function_hash": "67697613995459203038478013586271067568"
        },
        "source": "https://github.com/gocd/gocd/commit/2b77b533abcbb79c8fc758dec9984305dc1ade42",
        "target": {
            "function": "rejectsObviouslyWrongURL",
            "file": "config/config-api/src/test/java/com/thoughtworks/go/config/materials/git/GitMaterialConfigTest.java"
        }
    },
    {
        "id": "CVE-2021-43286-50bcf4ba",
        "deprecated": false,
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "length": 935.0,
            "function_hash": "169831231781064058981204781722622135125"
        },
        "source": "https://github.com/gocd/gocd/commit/4c4bb4780eb0d3fc4cacfc4cfcc0b07e2eaf0595",
        "target": {
            "function": "getArtifact",
            "file": "server/src/main/java/com/thoughtworks/go/server/controller/ArtifactsController.java"
        }
    },
    {
        "id": "CVE-2021-43286-58c70e0e",
        "deprecated": false,
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "182357443394901175771117964009488958569",
                "122587249007209937656469280531535962940",
                "317104213589422814638974090981600203285",
                "266316178930084899270927139731102334650"
            ]
        },
        "source": "https://github.com/gocd/gocd/commit/6fa9fb7a7c91e760f1adc2593acdd50f2d78676b",
        "target": {
            "file": "config/config-api/src/main/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfig.java"
        }
    },
    {
        "id": "CVE-2021-43286-6b1a3e01",
        "deprecated": false,
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "291402298148347228049996291675093051684",
                "60179680960122805699993480352254423756",
                "138167703017622584967500002829531953664",
                "278831703352160923685892248821975103407",
                "95702031903676119750429328764733612258",
                "82561555552356392574381781559758897211",
                "243307705736633892525720066115560971627",
                "312887617919318298140927573637502669491",
                "308723042722014712401737094152482788800",
                "277577523574876695115499673138300964459"
            ]
        },
        "source": "https://github.com/gocd/gocd/commit/6fa9fb7a7c91e760f1adc2593acdd50f2d78676b",
        "target": {
            "file": "config/config-api/src/main/java/com/thoughtworks/go/util/command/UrlArgument.java"
        }
    },
    {
        "id": "CVE-2021-43286-77e0baff",
        "deprecated": false,
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "207017817213356617334294398820425305959",
                "279807186767740084866471177514916774680",
                "226328444894167645552251181514570730812",
                "160982917404580497390975626027466777135"
            ]
        },
        "source": "https://github.com/gocd/gocd/commit/2b77b533abcbb79c8fc758dec9984305dc1ade42",
        "target": {
            "file": "config/config-api/src/test/java/com/thoughtworks/go/config/materials/mercurial/HgMaterialConfigTest.java"
        }
    },
    {
        "id": "CVE-2021-43286-7f91815c",
        "deprecated": false,
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "26522288559323060997201807951836629396",
                "96510353145310349605725042744350582571",
                "68980644443027958999690558213913474679",
                "101698749617363282742967142001105087095",
                "190213211819086323768638222173886165671",
                "63191507798081865179586568045206977474",
                "324938032890769548571959064708928223179",
                "259311025825608354948643960974008112628"
            ]
        },
        "source": "https://github.com/gocd/gocd/commit/6fa9fb7a7c91e760f1adc2593acdd50f2d78676b",
        "target": {
            "file": "config/config-api/src/test/java/com/thoughtworks/go/config/materials/svn/SvnMaterialConfigTest.java"
        }
    },
    {
        "id": "CVE-2021-43286-81c3ff5a",
        "deprecated": false,
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "298214558591656237289839548608365141585",
                "235689868302045003281653438688975036198",
                "1398522834928937169140392168178160436",
                "155016267510074735058105662132927337208",
                "91397206335302729074442532985982334369",
                "327308382977480632691375925725559245177",
                "158154655679497800014100990936376881872",
                "266021631059246183141657254609733555938",
                "306878369484164930597480048743360755570",
                "153991472596403216113969796359517662275",
                "75666247817990809923094242587624633746",
                "173136836590526063816755991849031362868"
            ]
        },
        "source": "https://github.com/gocd/gocd/commit/6fa9fb7a7c91e760f1adc2593acdd50f2d78676b",
        "target": {
            "file": "domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java"
        }
    },
    {
        "id": "CVE-2021-43286-89aa49b9",
        "deprecated": false,
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "length": 601.0,
            "function_hash": "98123065985520526953442517371691198343"
        },
        "source": "https://github.com/gocd/gocd/commit/2b77b533abcbb79c8fc758dec9984305dc1ade42",
        "target": {
            "function": "rejectsObviouslyWrongURL",
            "file": "config/config-api/src/test/java/com/thoughtworks/go/config/materials/tfs/TfsMaterialConfigTest.java"
        }
    },
    {
        "id": "CVE-2021-43286-8cbaf716",
        "deprecated": false,
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "length": 805.0,
            "function_hash": "46622639701462554494085306319090792137"
        },
        "source": "https://github.com/gocd/gocd/commit/4c4bb4780eb0d3fc4cacfc4cfcc0b07e2eaf0595",
        "target": {
            "function": "consoleout",
            "file": "server/src/main/java/com/thoughtworks/go/server/controller/ArtifactsController.java"
        }
    },
    {
        "id": "CVE-2021-43286-a27cb5bf",
        "deprecated": false,
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "315621648548621436461105748250437706863",
                "142007557300608952699104815868962664942",
                "117056605592290363133607716836845124",
                "189874911327078038484189683514563921426"
            ]
        },
        "source": "https://github.com/gocd/gocd/commit/2b77b533abcbb79c8fc758dec9984305dc1ade42",
        "target": {
            "file": "config/config-api/src/test/java/com/thoughtworks/go/config/materials/svn/SvnMaterialConfigTest.java"
        }
    },
    {
        "id": "CVE-2021-43286-a5825c78",
        "deprecated": false,
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "33735617415072634415605468656295610382",
                "23951720344777403940420763147670597761",
                "102824771183225668497387275431107389123"
            ]
        },
        "source": "https://github.com/gocd/gocd/commit/6fa9fb7a7c91e760f1adc2593acdd50f2d78676b",
        "target": {
            "file": "config/config-api/src/test/java/com/thoughtworks/go/config/materials/git/GitMaterialConfigTest.java"
        }
    },
    {
        "id": "CVE-2021-43286-adc200bf",
        "deprecated": false,
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "281659552250194868476142282953142213292",
                "196332420484885630408010714904314068416",
                "15829241831615066019616450195634756628",
                "62570196001929600693757419291535707111",
                "29959578211043664376014176858171956309",
                "293092674517413171905818327777769118655",
                "146241024181632261773002713274232561159",
                "68792150765778926520651040587629804093",
                "186809522909302019596175527718256477360",
                "90856636458029046749423466447521308988",
                "313210472697405348568997134465747757558",
                "34651270762866895094258096203728838709",
                "69243130492007080320008760463947668594",
                "160288913204168826980561704627235127045",
                "18278979433691693564147521190883806173",
                "216751654631110269066514979383027691946",
                "94570555055100526189034006285054527680",
                "269064464448806569024441384209803589013",
                "189526200354711527103710530280367683479",
                "122349815376795730927699741072622228167",
                "106514462818916165381845894810581714865"
            ]
        },
        "source": "https://github.com/gocd/gocd/commit/6fa9fb7a7c91e760f1adc2593acdd50f2d78676b",
        "target": {
            "file": "config/config-api/src/test/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfigTest.java"
        }
    },
    {
        "id": "CVE-2021-43286-b49f1821",
        "deprecated": false,
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "length": 163.0,
            "function_hash": "63507698675856625582246392637965319903"
        },
        "source": "https://github.com/gocd/gocd/commit/6fa9fb7a7c91e760f1adc2593acdd50f2d78676b",
        "target": {
            "function": "validateMaterialUrl",
            "file": "config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java"
        }
    },
    {
        "id": "CVE-2021-43286-bc454892",
        "deprecated": false,
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "48864159777377242932078071986750660707",
                "212157941612981526427271491384301266425",
                "63225958906781602697658846834403887599",
                "52119644913385577926302600477240129476",
                "252411065155186517161509563267335817955",
                "214335462170545492114465192604805155458",
                "222567581866133253561956431813579764785"
            ]
        },
        "source": "https://github.com/gocd/gocd/commit/6fa9fb7a7c91e760f1adc2593acdd50f2d78676b",
        "target": {
            "file": "config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java"
        }
    },
    {
        "id": "CVE-2021-43286-c62c5dea",
        "deprecated": false,
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "219744567178386472931426060691752182870",
                "33826569787096491834605372258126750130",
                "50716403453545536161590681343053786441",
                "36699377348188772274659214622610304835",
                "186402665283495640455695244972906634561",
                "105738403421211834056096073550232370866",
                "249186177297844560674030412416911095073"
            ]
        },
        "source": "https://github.com/gocd/gocd/commit/4c4bb4780eb0d3fc4cacfc4cfcc0b07e2eaf0595",
        "target": {
            "file": "server/src/main/java/com/thoughtworks/go/server/controller/ArtifactsController.java"
        }
    },
    {
        "id": "CVE-2021-43286-ce32e2d6",
        "deprecated": false,
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "9791864127558137972149176360292095756",
                "220961181960745357304750543878225392937",
                "183331836102668432758727581705553000952",
                "252918206875293873567648119809519195368",
                "514705892235927036380142281910640812",
                "163031613220443355605134562049461185827",
                "266694064033249085145422789642047068864",
                "1316502142268814577911231482931709336",
                "189387218769957283331169470315364707572",
                "259311025825608354948643960974008112628"
            ]
        },
        "source": "https://github.com/gocd/gocd/commit/6fa9fb7a7c91e760f1adc2593acdd50f2d78676b",
        "target": {
            "file": "config/config-api/src/test/java/com/thoughtworks/go/config/materials/mercurial/HgMaterialConfigTest.java"
        }
    },
    {
        "id": "CVE-2021-43286-d0500cda",
        "deprecated": false,
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "134065708198182531113973669937575062365",
                "185191047830209827073952436412799162751",
                "330510497596594304962125296471416375026",
                "196249076240397655792958356108414624703"
            ]
        },
        "source": "https://github.com/gocd/gocd/commit/2b77b533abcbb79c8fc758dec9984305dc1ade42",
        "target": {
            "file": "config/config-api/src/test/java/com/thoughtworks/go/config/materials/tfs/TfsMaterialConfigTest.java"
        }
    },
    {
        "id": "CVE-2021-43286-d129b0f9",
        "deprecated": false,
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "131501276728147763234814172690856522846",
                "315974602696098933778573272386948376001",
                "308504457019056922926247284832375853628"
            ]
        },
        "source": "https://github.com/gocd/gocd/commit/6fa9fb7a7c91e760f1adc2593acdd50f2d78676b",
        "target": {
            "file": "config/config-api/src/test/java/com/thoughtworks/go/helper/MaterialConfigsMother.java"
        }
    },
    {
        "id": "CVE-2021-43286-dbc6a469",
        "deprecated": false,
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "310778730685194840222061493131134342484",
                "183781255562500011360329498896821721757",
                "133660219477177301763207712348556844087",
                "77219110858672217183571613910688388389",
                "92117334220920507308493921183417306689"
            ]
        },
        "source": "https://github.com/gocd/gocd/commit/6fa9fb7a7c91e760f1adc2593acdd50f2d78676b",
        "target": {
            "file": "config/config-api/src/test/java/com/thoughtworks/go/config/materials/ScmMaterialConfigTest.java"
        }
    },
    {
        "id": "CVE-2021-43286-dfe2ce04",
        "deprecated": false,
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "length": 156.0,
            "function_hash": "84752573307991505129223106337591561836"
        },
        "source": "https://github.com/gocd/gocd/commit/6fa9fb7a7c91e760f1adc2593acdd50f2d78676b",
        "target": {
            "function": "add",
            "file": "domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java"
        }
    },
    {
        "id": "CVE-2021-43286-e3796e92",
        "deprecated": false,
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "length": 448.0,
            "function_hash": "274896946703909772875373426739813520479"
        },
        "source": "https://github.com/gocd/gocd/commit/6fa9fb7a7c91e760f1adc2593acdd50f2d78676b",
        "target": {
            "function": "submoduleAdd",
            "file": "domain/src/main/java/com/thoughtworks/go/domain/materials/git/GitCommand.java"
        }
    },
    {
        "id": "CVE-2021-43286-f0b612c9",
        "deprecated": false,
        "signature_type": "Line",
        "signature_version": "v1",
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "130395439013363367644280351635505027514",
                "113151394103127314168220419718526702946",
                "112132442769236408008251826190231971317",
                "16081987873916310016966189413085486275",
                "338492800022323867351038087813818051794",
                "95551792342617764394091907880055814973",
                "31028245404329220748478434256568936944",
                "17663457408723480406656517160487811877"
            ]
        },
        "source": "https://github.com/gocd/gocd/commit/6fa9fb7a7c91e760f1adc2593acdd50f2d78676b",
        "target": {
            "file": "config/config-api/src/test/java/com/thoughtworks/go/config/materials/tfs/TfsMaterialConfigTest.java"
        }
    },
    {
        "id": "CVE-2021-43286-fee517bb",
        "deprecated": false,
        "signature_type": "Function",
        "signature_version": "v1",
        "digest": {
            "length": 1109.0,
            "function_hash": "274344877733229985378902524396585944196"
        },
        "source": "https://github.com/gocd/gocd/commit/6fa9fb7a7c91e760f1adc2593acdd50f2d78676b",
        "target": {
            "function": "setConfigAttributes_shouldUpdatePasswordWhenPasswordChangedBooleanChanged",
            "file": "config/config-api/src/test/java/com/thoughtworks/go/config/materials/perforce/P4MaterialConfigTest.java"
        }
    }
]
source
"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-43286.json"