Clojure has released 1.12.7 to prevent its function objects from being serialized or deserialized by default. The November 18 advisory describes code execution when an application reads attacker-controlled Java object streams, bytes that reconstruct Java objects. Update the deployed Clojure library and remove untrusted object-deserialization paths.

The exposure requires both Clojure on the application’s classpath, where Java finds its libraries, and attacker-controlled bytes reaching ObjectInputStream.readObject(). Merely using Clojure or accepting ordinary JSON does not establish this attack path.

Reconstructing an object can invoke a function

Java deserialization can execute methods while rebuilding an object’s internal state. The advisory shows how a standard Java collection can invoke a compiled Clojure function during reconstruction. The resulting chain reaches Clojure’s compiler and evaluates supplied source text.

The report says this needs only the JDK, Java’s development platform, and Clojure’s own library. It requires no application-specific helper class. Disabling *read-eval*, Clojure’s reader-evaluation setting, does not stop this route because it reaches the compiler through a different function.

Evidence status: maintainer-published vulnerability with a reporter’s controlled demonstration. The advisory reports reproductions on 1.10.3, 1.11.1, 1.12.4, 1.12.6 and 1.13.0-alpha11. It supplies no identified victims or evidence of in-the-wild exploitation. GitHub labels the report as submitted with AI assistance; its acceptance and the release repair matter more than that label.

The repair changes serialization behavior

The advisory lists these affected versions:

Release line Affected range Listed repair
Stable and older releases 1.12.6 and earlier 1.12.7
Development releases 1.13.0-alpha1 through 1.13.0-alpha11 No repaired alpha listed in this advisory

Clojure’s download page confirms 1.12.7, dated November 18, as the stable release. The maintainers’ changelog says Clojure functions now throw on both serialization and deserialization by default.

The changelog also documents clojure.serializable.fns=true, a compatibility setting that permits those operations in a known-safe context. Review whether that setting is enabled when verifying the repair. Upgrading while deliberately restoring the old behavior weakens this specific protection.

The advisory has no assigned CVE at review. Its canonical identifier is GHSA-x4c4-68gp-vrhc. References in its reproduction narrative to a previously patched release concern earlier serialization work; they do not make 1.12.6 the repair for this report.

Review the input boundary and compatibility together

For application maintainers:

  • Upgrade the application dependency to Clojure 1.12.7 and redeploy the actual runtime. Updating a developer’s CLI alone does not establish which library the deployed application loads.
  • Review uses of Java object deserialization. The advisory names remote-management services, caches, session stores and message brokers as places these streams may enter. Check whether untrusted parties can influence their bytes.
  • Prefer removing untrusted Java deserialization. The release blocks this Clojure function chain, while other classes may provide other dangerous reconstruction paths.
  • If deserialization must remain, configure and validate a restrictive object filter. The advisory recommends rejecting clojure.lang.AFunction through Java’s ObjectInputFilter, the class-selection control for deserialization. An allowlist admitting all clojure.** classes leaves this reported chain reachable.
  • Test legitimate persistence and messaging workflows before rollout. Systems that intentionally serialize functions may now fail. Resolve that dependency explicitly rather than broadly re-enabling function serialization around untrusted streams.

The defensive boundary is the object reader and the classes it may instantiate. A language reader setting or a broad dependency allowlist addresses a different question.

Caveat: The update blocks this function-based chain by default; it does not make arbitrary Java object streams safe to accept from strangers.