Offline educational model of CVE-2026-31864 (JumpServer YAML Jinja sandbox)
Offline, inert model of CVE-2026-31864 (GHSA-qx8h-rx2j-j5wc). JumpServer
rendered uploaded Applet / VirtualApp manifest.yml files through a plain
jinja2.Environment() in yaml_load_with_i18n (820b8315:L40). An
administrator who could upload a ZIP reached RCE in the Core container.
The fix, commit 820b831588693c3e8ffdba712941ce123d29841d (PR #16608,
in v4.10.16 — see evidence/fix-in-v4.10.16.md),
switches to SandboxedEnvironment(undefined=StrictUndefined), clears
filters/globals, keeps only |trans, and on any render exception falls
back to the original text (820b8315:L49-52).
Spanish: README.es.md. Exercises: PRACTICE.md.
src/c9js/template.py: symbolic {{ expr }} engine (no jinja2).src/c9js/yml.py: pre vs post policy, |trans rewrite, filter clearing
(FILTER_CLEARED, 820b8315:L36), StrictUndefined → FALLBACK_ORIGINAL (820b8315:L49-52).results/summary.csv)| Class | n | pre | post |
|---|---|---|---|
| pos | 4 | 4 INTERNAL_REACHED | 2 FALLBACK_ORIGINAL, 2 BLOCKED_EMPTY |
| neg | 3 | OK | OK / FALLBACK (StrictUndefined) |
| compat | 1 | UNSUPPORTED filter | FILTER_CLEARED |
Every line citation has the form <tag>:L<n> or <tag>:L<n>-<m>: the real
cat -n line(s) of the upstream fix diff. The diff is not included in
this repo (upstream license: GPL-3.0); sources/diffs.tsv names it:
820b8315 → CVE-2026-31864_jumpserver_820b83158869.diff, SHA-256 74fe9f6c651d2a9641afad0a2d5a87b9af894cfdc6d0ec2f755b28a34971b22a,
https://github.com/jumpserver/jumpserver/commit/820b831588693c3e8ffdba712941ce123d29841d.diffcitations.tsv is the single table of cited ranges; for each range it
stores the SHA-256 of the cited text (lines start..end of the diff file
exactly as stored, joined with \n, no final newline, UTF-8; shell:
sed -n "${start},${end}p" "$C9_DIFF" | head -c -1 | sha256sum).
curl -fsSL -o /tmp/CVE-2026-31864_jumpserver_820b83158869.diff https://github.com/jumpserver/jumpserver/commit/820b831588693c3e8ffdba712941ce123d29841d.diff
sha256sum /tmp/CVE-2026-31864_jumpserver_820b83158869.diff # must be 74fe9f6c651d2a9641afad0a2d5a87b9af894cfdc6d0ec2f755b28a34971b22a
C9_DIFF=/tmp/CVE-2026-31864_jumpserver_820b83158869.diff PYTHONPATH=src python3 -m unittest -v tests.test_citations
Without C9_DIFF (as in CI) tests/test_citations.py checks the table
format, that every citation in the repo is in the table and that none lacks
a tag, and reports the content check as an explicit skip.
PYTHONPATH=src python3 -m unittest discover -s tests -v
python3 scripts/derive_expected.py | diff - fixtures/expected.tsv
python3 scripts/gen_results.py /tmp/r && diff -r results /tmp/r
A model is not a finding. See LIMITATIONS.md and SOURCES.md. License: Apache-2.0.