SEC2-023: The threat model says a theme is "never" handed a referee's entry or contact, but the template context carries the whole CV #965
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#965
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-10-16 in a read-only security review of
postuloat56fc9d531, checked by a second, independent pass.Severity: Informational · Category: Configuration · Reference: CWE-1059 (Insufficient Technical Documentation); OWASP A04:2021 (Insecure Design)
Location:
docs/THREAT-MODEL.md:78-79(the referee paragraph's promise about themes)src/postulo/documents/rendering.py:488("cv": cvin the theme context) and:825("letter": letter)src/postulo/documents/rendering.py:170-225(Referee,referee_for)Issue
THREAT-MODEL.mdpromises: "The renderer hands a theme a read-only value built under those two rules and never the entry or the contact, so a theme from a plugin cannot step round them."build_sectionsdoes exactly that forsections: a reference becomes aRefereevalue with the email and number blank unless agreed and chosen. But the same context also passes the model instance:Django templates follow relations, so a theme can reach each CV item's reference entry and its contact (address included, agreed or not) through
cv, and the person's own profile fields the CV switched off. The shipped themes read onlycv.headline,cv.summary,cv.show_eqf_levelandcv.references_on_requestfrom it. The letter context is the same, and also carriesapplicationandletter.owner. #820 recorded that plugin themes are handed full records, and the threat model's plugin row now says so ("a plugin theme is handed full records to draw (#820)"), which leaves the referee paragraph contradicting the plugin paragraph in the same document.Impact
None beyond #820: a theme is installed by an administrator and trusted. The paragraph about referees overstates the guarantee.
Fix
Reword
docs/THREAT-MODEL.md:78-79to say that the shipped themes and thesectionsvalue obey the two rules, and that a theme from a plugin is handed the records and is trusted, as the plugin row says (#820). Handing themes a reduced read-only view of the CV and letter instead would be a change to the theme contract, which the open theme issues (#340, #341, #343) would have to be written against, and would still leaveapplicationandletter.ownerin the letter context. Done when the sentence is changed; optionally, a registered test theme intests/security/test_cv_prints.pythat walks the CV's items gives whichever promise the document makes a test.Related
#820 (closed) - the general statement that plugin themes get full instances; this paragraph is the part it left contradicting it. #696 (closed) - wrote the referee paragraph. #340, #341, #343 (open) - theme work a reduced theme context would have to be designed with.