Sling Commons JsonApplication · Apache

CVE-2022-47937

CRITICAL · 9.8 CVSS v3.1 Published 2023-05-15
Fix available
A fix is available. Upgrade to after 2.0.20 or later.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
Improper input validation in the Apache Sling Commons JSON bundle allows an attacker to trigger unexpected errors by supplying specially-crafted input. The org.apache.sling.commons.json bundle has been deprecated as of March 2017 and should not be used anymore. Consumers are encouraged to consider the Apache Sling Commons Johnzon OSGi bundle provided by the Apache Sling project, but may of course use other JSON libraries.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

The Apache Sling Commons JSON bundle contains an improper input validation vulnerability that allows attackers to supply specially-crafted input and trigger unexpected errors. This OSGi bundle has been deprecated since March 2017.

MitigationMigrate from the deprecated org.apache.sling.commons.json bundle to the Apache Sling Commons Johnzon OSGi bundle, as recommended by the Apache Sling project.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Sling Commons JsonApplication
Affected:<= 2.0.20

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify if Apache Sling Commons JSON bundle is deployed
    Query your OSGi runtime (e.g., Apache Felix Web Console, Apache Sling OSGi console, or using 'lb' command in Apache Karaf) for a bundle with symbolic name 'org.apache.sling.commons.json' or bundle name containing 'commons-json'.
    Affected if The bundle is present in the OSGi container.
  2. Retrieve the installed bundle version
    Locate the bundle in the OSGi management console or examine the META-INF/MANIFEST.MF file inside the deployed org.apache.sling.commons.json JAR file. Note the 'Bundle-Version' attribute.
    Affected if A version number is returned.
  3. Compare version against affected range
    Parse the retrieved version number and compare it to 2.0.20 using semantic version comparison. Any version <= 2.0.20 is affected.
    Affected if The installed version is 2.0.20 or any earlier version (e.g., 2.0.19, 2.0.0, 1.0).
  4. Verify the bundle is actively used
    Check application code, dependencies, or OSGi service references for imports or requires of package 'org.apache.sling.commons.json' or 'org.apache.commons.json'. Review any DynamicImport statements or required bundles referencing this package.
    Affected if The bundle is present AND the application code imports or uses the org.apache.sling.commons.json package.

You are affected if the org.apache.sling.commons.json bundle with version 2.0.20 or lower is deployed and actively used in your OSGi runtime.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to a release after 2.0.20
Interim mitigation

Migrate from the deprecated org.apache.sling.commons.json bundle to the Apache Sling Commons Johnzon OSGi bundle, as recommended by the Apache Sling project.

Recommended fix Moderate confidence

Apache Sling Commons Johnzon (recommended replacement for deprecated Commons Json)

  1. 1. Identify all usages of org.apache.sling.commons.json in your codebase
  2. 2. Review the Apache Sling Commons Johnzon documentation to understand the API differences between Commons Json and Johnzon
  3. 3. Update your project's dependencies to replace org.apache.sling.commons.json with org.apache.sling.commons.johnzon
  4. 4. Modify your code to use Johnzon classes (org.apache.johnzon.json.*) instead of org.apache.sling.commons.json.* classes
  5. 5. Test the application thoroughly to ensure JSON parsing and serialization functionality works correctly after the migration
  6. 6. Remove any remaining references to the deprecated Commons Json bundle from your OSGi configurations
Caveat API differences between Commons Json and Johnzon may require code changes; thorough testing recommended

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Sling Commons Json Scoped from the published advisory
  • Consultation4.0 h
  • Implementation12.0 h
  • Testing6.0 h
  • Review / QA3.0 h
25.0 hours of engineering $4,400
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $7,040.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2022-47937 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2022-47937 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data