Skip to main content

Insecure service configuration - Key pair


The credentials to access the Key pair are the same to access the Keystore, good practices with respect to containers recommend that they are different because in case one is compromised not both are compromised keytool -genkey, -keyalg RSA, -alias opkeystore, -keypass Kpassword, -keystore opkeystore.jks, -storepass Spassword, - validity 365. The Kpassword must be different from the Spassword.


Compromise the access to the files if the keys of the keystore are the same as those of the key pair.


Implement best practices in cryptographic systems Recommendation for Cryptographic Key Generation.


Anonymous attacker in adjacent network.

Expected Remediation Time

⌚ 60 minutes.


Default score using CVSS 3.1. It may change depending on the context of the src.


  • Attack vector: A
  • Attack complexity: L
  • Privileges required: N
  • User interaction: N
  • Scope: U
  • Confidentiality: L
  • Integrity: L
  • Availability: N


  • Exploit code maturity: X
  • Remediation level: O
  • Report confidence: X


  • Vector string: CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N/E:X/RL:O/RC:X
  • Score:
    • Base: 5.4
    • Temporal: 5.2
  • Severity:
    • Base: Medium
    • Temporal: Medium

Score 4.0

Default score using CVSS 4.0 . It may change depending on the context of the src.

Base 4.0

  • Attack vector: A
  • Attack complexity: L
  • Attack Requirements: N
  • Privileges required: N
  • User interaction: N
  • Confidentiality (VC): L
  • Integrity (VI): L
  • Availability (VA): N
  • Confidentiality (SC): N
  • Integrity (SI): N
  • Availability (SA): N

Threat 4.0

  • Exploit maturity: X

Result 4.0

  • Vector string: CVSS:4.0/AV:A/AC:L/AT:N/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N/E:X
  • Score:
    • CVSS-BT: 5.3
  • Severity:
    • CVSS-BT: Medium

Compliant code

Every sensitive resource has a secure key pair configuration

jarsigner -keystore "enc_password" -certchain "bundle.pem" -tsa "" -storetype PKCS11
-providerClass -providerArg "provider.cfg" -keypass "enc_password1"
-storepass "enc_password2" "[your_code].jar" "[your_alias]"

Non compliant code

There are shared key pairs for several sensitive resources

jarsigner -keystore "password1" -certchain "bundle.pem" -tsa "" -storetype PKCS11
-providerClass -providerArg "provider.cfg" -keypass "password1"
-storepass "password1" "[your_code].jar" "[your_alias]"



free trial

Search for vulnerabilities in your apps for free with Fluid Attacks' automated security testing! Start your 21-day free trial and discover the benefits of the Continuous Hacking Essential plan. If you prefer the Advanced plan, which includes the expertise of Fluid Attacks' hacking team, fill out this contact form.