Repository navigation
enable fastjson safeMode for rocketmq broker/nameserver/controller/exporter - #34
Merged
Merged
Conversation
…porter - inject -Dfastjson.parser.safeMode=true into broker/nameserver/controller startup scripts, before the JAVA_OPT_EXT line so users can still override - add -Dfastjson.parser.safeMode=true to exporter ENTRYPOINT (before -jar) - fix -Dmaven.test.skip=truedocker typo in exporter Dockerfile Mitigates fastjson 1.2.68~1.2.83 deserialization RCE (no upstream 1.x fix).
…usl:8 openjdk:8-alpine has been removed from Docker Hub (manifest unknown), breaking all broker/nameserver/controller builds. Liberica alpine-musl 8 (JDK 8u502) is a Docker verified publisher image with linux/amd64 + linux/arm64 support, keeps the apk-based build flow unchanged, and ships JAVA_HOME preconfigured.
trivy flags 3 CRITICALs (CVE-2026-41293, CVE-2026-43512, CVE-2026-43515) in tomcat-embed-core 9.0.74 pulled in via spring-boot-starter-parent 2.7.11. Override tomcat.version at build time; 9.0.118 is the fixed release on the same 9.0.x line.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
fastjson 1.2.68~1.2.83 has a deserialization RCE (Sangfor advisory 2026-07-21, no CVE assigned, no upstream 1.x fix). RocketMQ 5.x ships fastjson 1.2.83 in its official binary release; the exporter build pulls in fastjson 1.2.69_noneautotype. RocketMQ does not use autoType so real-world exploitability is low, but scanners flag it. Enabling safeMode (
-Dfastjson.parser.safeMode=true, supported since 1.2.68) fully disables autoType and is the recommended mitigation.Changes
JAVA_OPT="${JAVA_OPT} -Dfastjson.parser.safeMode=true"in the customize startup scripts, placed before the${JAVA_OPT_EXT}line so users can still override it via the documentedJAVA_OPT_EXTenv.-Dfastjson.parser.safeMode=trueto the exec-form ENTRYPOINT (before-jar; exec form has no shell so an ENV-based approach would not work).-Dmaven.test.skip=truedockertypo →-Dmaven.test.skip=true(tests were silently not being skipped).openjdk:8-alpinehas been removed from Docker Hub, so broker/nameserver/controller builds fail on main as well. Switched tobellsoft/liberica-openjdk-alpine-musl:8(JDK 8u502, Docker verified publisher, linux/amd64 + linux/arm64, keeps the apk build flow and standard JDK8 layout incl.jre/lib/ext).-Dtomcat.versionbuild override: trivy gates on 3 CRITICALs (CVE-2026-41293 / CVE-2026-43512 / CVE-2026-43515) fixed in 9.0.118 (same 9.0.x line as managed by spring-boot-starter-parent 2.7.11).Release plan
After merge, new tags will be published via
build-push-images.yml: broker/nameserver/controllerv5.3.3-3+v5.1.4-3, exporterv0.1.2.