CVE-2016-2510: Bsh Improper Input Validation Vulnerability

HIGH
Advisory Identifier: GHSA-gxg6-rc6c-v673
CVSS 8.1
CWE-20
Published
Advisory Summary

CVE-2016-2510 is a HIGH (CVSS 8.1) improper input validation vulnerability (CWE-20: Improper Input Validation) affecting Bsh libraries in the Maven ecosystem. The issue involves improper input validation in beanshell. Remediation is available by upgrading affected packages to version 2.0b6.

CVE-2016-2510 at a Glance

CVE Identifier CVE-2016-2510
GHSA Identifier GHSA-gxg6-rc6c-v673
Severity HIGH
CVSS v3.1 Base Score 8.1
CWE Classification CWE-20: Improper Input Validation
Affected Product Bsh
Package Ecosystem Maven
Published Date
Last Updated

Security Impact

CVSS: 8.1

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

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

How to Fix CVE-2016-2510

To remediate this vulnerability, upgrade all affected Bsh 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.apache-extras.beanshell:bsh fixed: 2.0b6
<dependency>
    <groupId>org.apache-extras.beanshell</groupId>
    <artifactId>bsh</artifactId>
    <version>2.0b6</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.apache-extras.beanshell

How to Check if You Are Affected

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

mvn dependency:tree -Dincludes=org.apache-extras.beanshell

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

Note: The mvn dependency:tree -Dincludes=org.apache-extras.beanshell 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 Bsh, 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

BeanShell (bsh) before 2.0b6, when included on the classpath by an application that uses Java serialization or XStream, allows remote attackers to execute arbitrary code via crafted serialized data, related to XThis.Handler.

CVE-2016-2510 Affected Bsh Versions

1 component(s)
Fixed Versions:
2.0b6
Product / Package Ecosystem Affected Versions Fixed Version
org.apache-extras.beanshell:bsh
Maven
< 2.0b6
2.0b6

References

NVD — CVE-2016-2510 NVD
https://nvd.nist.gov/vuln/detail/CVE-2016-2510
Bsh Source Repository REPOSITORY
https://github.com/frohoff/ysoserial/pull/13
Security Fix Commit FIX COMMIT
https://github.com/beanshell/beanshell/commit/1ccc66bb693d4e46a34a904db8eeff07808d2ced
Security Fix Commit FIX COMMIT
https://github.com/beanshell/beanshell/commit/7c68fde2d6fc65e362f20863d868c112a90a9b49
access.redhat.com/errata/rhsa-2016:11... WEB
https://access.redhat.com/errata/RHSA-2016:1135
access.redhat.com/errata/rhsa-2016:13... WEB
https://access.redhat.com/errata/RHSA-2016:1376
access.redhat.com/errata/rhsa-2019:15... WEB
https://access.redhat.com/errata/RHSA-2019:1545
Bsh Release RELEASE
https://github.com/beanshell/beanshell/releases/tag/2.0b6
Bsh Security Information SECURITY
https://security.gentoo.org/glsa/201607-17
Bsh Security Information SECURITY
https://www.oracle.com/security-alerts/cpuoct2020.html
www.rsaconference.com/writable/presentati... WEB
https://www.rsaconference.com/writable/presentations/file_upload/asd-f03-serial-killer-silently-pwning-your-java-endpoints.pdf
Bsh Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00056.html
Bsh Security Information SECURITY
http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00078.html
rhn.redhat.com/errata/rhsa-2016-05... WEB
http://rhn.redhat.com/errata/RHSA-2016-0539.html
rhn.redhat.com/errata/rhsa-2016-05... WEB
http://rhn.redhat.com/errata/RHSA-2016-0540.html
rhn.redhat.com/errata/rhsa-2016-20... WEB
http://rhn.redhat.com/errata/RHSA-2016-2035.html
Bsh Security Information SECURITY
http://www.debian.org/security/2016/dsa-3504
www.ubuntu.com/usn/usn-2923-1 WEB
http://www.ubuntu.com/usn/USN-2923-1

Frequently Asked Questions

What is CVE-2016-2510?
CVE-2016-2510 is a security vulnerability in Bsh involving Improper Input Validation in BeanShell under CWE-20: Improper Input Validation.
Which Bsh versions are affected?
Affected versions include releases prior to 2.0b6 across affected packages: org.apache-extras.beanshell:bsh.
What version fixes CVE-2016-2510?
Upgrading to 2.0b6 (or the latest patched release for your respective branch) resolves the vulnerability.
Is bsh affected?
Yes, org.apache-extras.beanshell:bsh is affected in releases prior to 2.0b6. Upgrade your dependency to 2.0b6 or later.
What is the CVSS score of CVE-2016-2510?
CVE-2016-2510 has a CVSS v3.1 base score of 8.1 (HIGH) with vector string CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H.
What CWE is associated with CVE-2016-2510?
CVE-2016-2510 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-2016-2510?
Run the dependency tree command: 'mvn dependency:tree -Dincludes=org.apache-extras.beanshell'. 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-gxg6-rc6c-v673",
  "modified" : "2022-07-06T19:57:52Z",
  "published" : "2022-05-13T01:14:25Z",
  "aliases" : [ "CVE-2016-2510" ],
  "summary" : "Improper Input Validation in BeanShell",
  "details" : "BeanShell (bsh) before 2.0b6, when included on the classpath by an application that uses Java serialization or XStream, allows remote attackers to execute arbitrary code via crafted serialized data, related to XThis.Handler.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Maven",
      "name" : "org.apache-extras.beanshell:bsh"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "2.0b6"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 2.0b5"
    }
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2016-2510"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/frohoff/ysoserial/pull/13"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/beanshell/beanshell/commit/1ccc66bb693d4e46a34a904db8eeff07808d2ced"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/beanshell/beanshell/commit/7c68fde2d6fc65e362f20863d868c112a90a9b49"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2016:1135"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2016:1376"
  }, {
    "type" : "WEB",
    "url" : "https://access.redhat.com/errata/RHSA-2019:1545"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/beanshell/beanshell/releases/tag/2.0b6"
  }, {
    "type" : "WEB",
    "url" : "https://security.gentoo.org/glsa/201607-17"
  }, {
    "type" : "WEB",
    "url" : "https://www.oracle.com/security-alerts/cpuoct2020.html"
  }, {
    "type" : "WEB",
    "url" : "https://www.rsaconference.com/writable/presentations/file_upload/asd-f03-serial-killer-silently-pwning-your-java-endpoints.pdf"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00056.html"
  }, {
    "type" : "WEB",
    "url" : "http://lists.opensuse.org/opensuse-security-announce/2016-03/msg00078.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2016-0539.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2016-0540.html"
  }, {
    "type" : "WEB",
    "url" : "http://rhn.redhat.com/errata/RHSA-2016-2035.html"
  }, {
    "type" : "WEB",
    "url" : "http://www.debian.org/security/2016/dsa-3504"
  }, {
    "type" : "WEB",
    "url" : "http://www.ubuntu.com/usn/USN-2923-1"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-20" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2022-07-06T19:57:52Z",
    "nvd_published_at" : "2016-04-07T20:59:00Z"
  }
}