Stirling-PDF icon indicating copy to clipboard operation
Stirling-PDF copied to clipboard

Feature Request / Security Update: Bump Java/Python dependencies in container builds

Open upmcplanetracker opened this issue 3 months ago • 2 comments

When running Stirling-PDF in a self-hosted environment exposed to the internet without strict access controls, out-of-date application dependencies in the container image expose instances to Remote Code Execution (RCE) and XML External Entity (XXE) attacks.

While base OS package scan noise can be ignored, several upstream Java dependencies in the current build have fixed security releases available:

  1. com.fasterxml.jackson.core:jackson-databind (RCE)
    • Current Version: 2.21.2 / 3.1.2
    • Fixed In: 2.18.8, 2.21.4, 3.1.4
    • Risk: Polymorphic deserialization bypass leading to Arbitrary Code Execution on unauthenticated API payloads.
  2. org.verapdf:validation-model (XXE / Local File Disclosure)
    • Current Version: 1.28.2
    • Fixed In: 1.30.2
    • Risk: Malicious PDF uploads containing Rich Text or XFA forms can trigger local file reading off the server host.
  3. org.eclipse.jetty:jetty-security (Auth Bypass)
    • Current Version: 12.1.8
    • Fixed In: 12.1.10
    • Risk: Authentication bypass via Digest encoding collision.

please update the core pom.xml / build.gradle and Python dependency declarations to pull the updated library patch versions in the next image build.

Users who deploy stirling-pdf:latest-fat on public domains or behind reverse proxies without mandatory login enabled are particularly vulnerable to these application-layer exploits. Bumping these application dependencies directly resolves the risk.

Most people run self hosted versions of StirlingPDF appropriately - behind firewalls, with ports closed, etc. etc. and don't have to worry, but some people leave their instance open to the internet because they don't know better.

thank you for your consideration.

upmcplanetracker avatar Aug 19 '26 17:08 upmcplanetracker

Hi,

I think most of those were already bumped, we just have not had a "proper" release for more than a month.

See on current main: https://github.com/Stirling-Tools/Stirling-PDF/blob/088e0ef4e25e06ae5f911f8be74912fef8673240/app/core/build.gradle#L53

https://github.com/Stirling-Tools/Stirling-PDF/blob/088e0ef4e25e06ae5f911f8be74912fef8673240/build.gradle#L41

And for jetty we are pulling it from somewhere else, as in indirect dep but still we are on a secure version:

https://github.com/Stirling-Tools/Stirling-PDF/blob/088e0ef4e25e06ae5f911f8be74912fef8673240/app/core/src/main/resources/static/3rdPartyLicenses.json#L1875

You can use alpha, which should have all this. But generally, vulnerable downstream packages may not translate to a problem here.

For VeraPDF the disclosure says (https://github.com/advisories/GHSA-cg9x-g3gm-h5h6):

Consumers that utilise either the PDFAValidator.validate(...) or GFPDAcroForm(acroForm).getdynamicRender() APIs to process untrusted PDFs are vulnerable to XXE exploits.

We use neither. So not problematic for us, either way.

For Jetty also not problematic because we use Spring Security for all auth, not Jetty's native digest auth.

Jackson, also as far as i can tell we do not use the affected vulnerable features either... Them being: @JsonView, @JsonUnwrapped, @JsonTypeInfo(include = EXTERNAL_PROPERTY) (See: https://github.com/FasterXML/jackson-databind/security)

TLDR: we already bumped, but not yet released, but they are not problematic for us in their current state either, so no reason to rush.

As a general note, from handling many similar scanner-driven reports across other projects: it is very rare for a library to be vulnerable "from A to Z." Typically only one or a handful of specific features or methods are affected, and whether that matters depends entirely on whether the consuming project actually uses them. With large Java enterprise libraries like Jackson or Jetty (or Spring etc...) in particular, most consumers touch only a small fraction of the API surface... so a version-match finding alone rarely translates into a reachable vulnerability.

We still bump dependencies promptly regardless, as the links above show (by that I mean you can see on main we are pretty up to date). But for these specific issues, the practical risk to SPDF is zero.

Thanks!

balazs-szucs avatar Aug 19 '26 20:08 balazs-szucs

All fixed in fxed in v3.0.0

Frooodle avatar Sep 25 '26 09:09 Frooodle