{"id":"CVE-2025-68702","aliases":["CVE-2025-68702","GHSA-67rj-pjg6-pq59"],"related":[],"kind":"vulnerability","state":"published","title":"Jervis has a SHA-256 Hex String Padding Bug","summary":"Jervis is a library for Job DSL plugin scripts and shared Jenkins pipeline libraries. Prior to 2.2, Jervis uses padLeft(32, '0') when it  should use padLeft(64, '0') because SHA-256 produces 32 bytes which equates to 64 hex characters. This vulnerability is fixed in 2.2.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"Jervis is a library for Job DSL plugin scripts and shared Jenkins pipeline libraries. Prior to 2.2, Jervis uses padLeft(32, '0') when it  should use padLeft(64, '0') because SHA-256 produces 32 bytes which equates to 64 hex characters. This vulnerability is fixed in 2.2.","source":"cvelist"},{"lang":"en","text":"### Vulnerability\n\nhttps://github.com/samrocketman/jervis/blob/157d2b63ffa5c4bb1d8ee2254950fd2231de2b05/src/main/groovy/net/gleske/jervis/tools/SecurityIO.groovy#L622-L626\n\n`padLeft(32, '0')` should be `padLeft(64, '0')`. SHA-256 produces 32 bytes = 64 hex characters.\n\n### Impact\n\n* Inconsistent hash lengths when leading bytes are zero\n* Comparison failures for hashes with leading zeros\n* Potential security issues in hash-based comparisons\n* Could cause subtle bugs in systems relying on consistent hash lengths\n\nSeverity is considered low for internal uses of this library but if there's any consumer using these methods directly then this is considered high.\n\n### Patches\n\nUpgrade to Jervis 2.2.\n\n### Workarounds\n\nUse an alternate SHA-256 hash function or upgrade.","format":"markdown","source":"ghsa"},{"lang":"es","text":"Jervis es una biblioteca para scripts del plugin Job DSL y bibliotecas compartidas de pipeline de Jenkins. Antes de 2.2, Jervis utiliza padLeft(32, '0') cuando debería usar padLeft(64, '0') porque SHA-256 produce 32 bytes, lo que equivale a 64 caracteres hexadecimales. Esta vulnerabilidad está corregida en 2.2.","source":"nvd"}],"published":"2026-01-13T14:52:31.000Z","modified":"2026-06-17T09:59:25.940Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","score":8.7,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N","rating":"HIGH"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N","score":7.5,"rating":"HIGH"}],"cwes":["CWE-327"],"affected":[{"ranges":[{"version":"< 2.2","status":"affected"}],"vendor":"samrocketman","product":"jervis","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"2.2"}],"ecosystem":"Maven","package":"net.gleske:jervis","purl":"pkg:maven/net.gleske/jervis","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"2.2"}],"vendor":"samrocketman","product":"jervis","cpe":"cpe:2.3:a:samrocketman:jervis:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://github.com/samrocketman/jervis/security/advisories/GHSA-67rj-pjg6-pq59","tags":["patch","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://github.com/samrocketman/jervis/commit/c3981ff71de7b0f767dfe7b37a2372cb2a51974a","tags":["patch","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68702","tags":["advisory"],"sources":["ghsa"]},{"url":"https://github.com/samrocketman/jervis","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/samrocketman/jervis/blob/157d2b63ffa5c4bb1d8ee2254950fd2231de2b05/src/main/groovy/net/gleske/jervis/tools/SecurityIO.groovy#L622-L626","tags":["web"],"sources":["ghsa"]},{"url":"http://github.com/samrocketman/jervis/commit/c3981ff71de7b0f767dfe7b37a2372cb2a51974a","tags":["web"],"sources":["ghsa"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"yes","technicalImpact":"partial","date":"2026-01-13T19:55:11.825Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-68702","url":"https://www.cve.org/CVERecord?id=CVE-2025-68702","licence":"CVE Terms of Use","modified":"2026-01-13T19:55:16.378Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-67rj-pjg6-pq59","url":"https://github.com/advisories/GHSA-67rj-pjg6-pq59","licence":"CC-BY-4.0","modified":"2026-02-03T03:11:40.165Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-68702","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-68702","licence":"Public domain","modified":"2026-06-17T09:59:25.940Z"}],"updatedAt":"2026-11-25T22:59:10.586Z","epss":{"score":0.00174,"percentile":0.07205,"date":"2026-12-01T12:00:22.000Z"}}