Summary
A Critical-severity advisory has been flagged against guardian/flexible-restorer for Bouncy Castle (org.bouncycastle:bcprov-*). The GOST 28147-2015 CTR mode implementation (G3413CTRBlockCipher) only increments the final byte of the counter, so the counter wraps after 255 blocks and the keystream is reused. Keystream reuse in CTR mode lets an attacker who observes two ciphertexts encrypted under the same key/IV recover the XOR of the plaintexts, breaking confidentiality.
- Affected versions:
>= 1.59, <= 1.80.1, = 1.81.0, >= 1.82, <= 1.83
- Patched versions:
1.84 (with backports in 1.80.2 and 1.81.1 for some artifacts)
- Source: Dependabot alert / GitHub Advisory Database
Real-world risk for this repo: LOW
- Bouncy Castle is a transitive-only dependency — it is not declared directly in
build.sbt or project/Dependencies.scala.
- The vulnerable code path is GOST 28147 CTR mode, a Russian national cipher standard that this application has no reason to invoke.
- No exploitable path has been identified. AES-CTR / GCM / TLS / JGit signing are unaffected.
This ticket is primarily alert hygiene and supply-chain diligence, not an active exploit risk.
Likely source of the dependency
Most probable transitive parent is org.eclipse.jgit (uses BC for SSH/crypto). Secondary candidates: pan-domain-auth, simple-configuration-ssm, or the AWS SDK.
Note: This repo targets Java 11, so the relevant artifact is likely bcprov-jdk18on. Confirm the exact artifact (-jdk18on vs -jdk15to18 vs -jdk14, and -debug/-ext variants) before pinning, since patched versions differ.
Acceptance criteria
Suggested approach
- Identify the artifact: Run
sbt dependencyTree (or whatDependsOn org.bouncycastle <artifact> <version>) to confirm coordinate, version, and the parent dependency pulling it in.
- Preferred fix — bump the parent: Upgrade the transitive parent (e.g.
org.eclipse.jgit) to a version that resolves a patched bcprov.
- Fallback fix — pin/override: Add a
dependencyOverrides entry in project/Dependencies.scala, e.g.:
dependencyOverrides += "org.bouncycastle" % "bcprov-jdk18on" % "1.84"
- Alternative — Dependabot PR: Allow the Dependabot security update PR to apply the patched version automatically.
- If deferring: Dismiss the alert as "vulnerable code (GOST CTR) not in execution path" — but upgrading is cheap and preferred.
Effort / Priority
- Effort: Small (dependency pin + build verification)
- Priority: Low–Medium (Critical CVSS, but no realistic exploit path in this app)
Summary
A Critical-severity advisory has been flagged against guardian/flexible-restorer for Bouncy Castle (
org.bouncycastle:bcprov-*). The GOST 28147-2015 CTR mode implementation (G3413CTRBlockCipher) only increments the final byte of the counter, so the counter wraps after 255 blocks and the keystream is reused. Keystream reuse in CTR mode lets an attacker who observes two ciphertexts encrypted under the same key/IV recover the XOR of the plaintexts, breaking confidentiality.>= 1.59, <= 1.80.1,= 1.81.0,>= 1.82, <= 1.831.84(with backports in1.80.2and1.81.1for some artifacts)Real-world risk for this repo: LOW
build.sbtorproject/Dependencies.scala.This ticket is primarily alert hygiene and supply-chain diligence, not an active exploit risk.
Likely source of the dependency
Most probable transitive parent is
org.eclipse.jgit(uses BC for SSH/crypto). Secondary candidates:pan-domain-auth,simple-configuration-ssm, or the AWS SDK.Acceptance criteria
bcprovartifact + version confirmed viasbt dependencyTree.>= 1.84, or the1.80.2/1.81.1backport as appropriate).Suggested approach
sbt dependencyTree(orwhatDependsOn org.bouncycastle <artifact> <version>) to confirm coordinate, version, and the parent dependency pulling it in.org.eclipse.jgit) to a version that resolves a patchedbcprov.dependencyOverridesentry inproject/Dependencies.scala, e.g.:Effort / Priority