Vulnerabilities in pkg:maven/org.kohsuke/libpam4j

PACKAGE
Advisory Identifier: GHSA-x9rg-q5fx-fx66
Advisory Summary

CVE-2017-12197 is a MODERATE (CVSS 6.5) improper input validation vulnerability (CWE-20: Improper Input Validation) affecting Libpam4j libraries in the Maven ecosystem. The issue involves improper input validation in libpam4j. Remediation is available by upgrading affected packages to version 1.10.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:maven/org.kohsuke/libpam4j

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:maven/org.kohsuke/libpam4j. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-x9rg-q5fx-fx66 CVE-2017-12197 MODERATE Improper Input Validation in libpam4j

CVE-2017-12197 at a Glance

CVE Identifier CVE-2017-12197
GHSA Identifier GHSA-x9rg-q5fx-fx66
Severity MODERATE
CVSS v3.1 Base Score 6.5
CWE Classification CWE-20: Improper Input Validation
Affected Product Libpam4j
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 6.5

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

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

How to Fix CVE-2017-12197

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

org.kohsuke:libpam4j fixed: 1.10
<dependency>
    <groupId>org.kohsuke</groupId>
    <artifactId>libpam4j</artifactId>
    <version>1.10</version>
</dependency>
Verify Direct and Transitive Dependencies

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

mvn dependency:tree -Dincludes=org.kohsuke

How to Check if You Are Affected

To determine whether your Java application is affected by CVE-2017-12197, inspect your build dependencies using the Maven Dependency Plugin:

mvn dependency:tree -Dincludes=org.kohsuke

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

Note: The mvn dependency:tree -Dincludes=org.kohsuke command inspects the resolved dependency graph declared in your project's POM files; it does not perform automated security scanning or inspect runtime dynamic classpaths. Always verify runtime container classpaths and shaded JARs.

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 Libpam4j, 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

It was found that libpam4j prior to 1.10 did not properly validate user accounts when authenticating. A user with a valid password for a disabled account would be able to bypass security restrictions and possibly access sensitive information.

CVE-2017-12197 Affected Libpam4j Versions

1 component(s)
Fixed Versions:
1.10
Product / Package Ecosystem Affected Versions Fixed Version
org.kohsuke:libpam4j
Maven
< 1.10
1.10

References

Frequently Asked Questions

What is CVE-2017-12197?
CVE-2017-12197 is a security vulnerability in Libpam4j involving Improper Input Validation in libpam4j under CWE-20: Improper Input Validation.
Which Libpam4j versions are affected?
Affected versions include releases prior to 1.10 across affected packages: org.kohsuke:libpam4j.
What version fixes CVE-2017-12197?
Upgrading to 1.10 (or the latest patched release for your respective branch) resolves the vulnerability.
Is libpam4j affected?
Yes, org.kohsuke:libpam4j is affected in releases prior to 1.10. Upgrade your dependency to 1.10 or later.
What is the CVSS score of CVE-2017-12197?
CVE-2017-12197 has a CVSS v3.1 base score of 6.5 (MODERATE) with vector string CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N.
What CWE is associated with CVE-2017-12197?
CVE-2017-12197 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 Maven dependencies for CVE-2017-12197?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.kohsuke'. 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-x9rg-q5fx-fx66",
  "modified" : "2022-07-01T21:27:13Z",
  "published" : "2022-05-13T01:38:10Z",
  "aliases" : [ "CVE-2017-12197" ],
  "summary" : "Improper Input Validation in libpam4j",
  "details" : "It was found that libpam4j prior to 1.10 did not properly validate user accounts when authenticating. A user with a valid password for a disabled account would be able to bypass security restrictions and possibly access sensitive information.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.0/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.kohsuke:libpam4j"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.10"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2017-12197"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kohsuke/libpam4j/issues/18"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/kohsuke/libpam4j/commit/02ffdff218283629ba4a902e7fe2fd44646abc21"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2017:2904"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2017:2905"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2017:2906"
  }, {
    "type" : "WEB",
    "url" : "https://bugzilla.redhat.com/show_bug.cgi?id=1503103"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/kohsuke/libpam4j"
  }, {
    "type" : "WEB",
    "url" : "https://lists.debian.org/debian-lts-announce/2017/11/msg00008.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.debian.org/security/2017/dsa-4025"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-01T21:27:13Z",
    "nvd_published_at" : "2018-01-18T21:29:00Z"
  }
}