Migrate off earmark: retired, unmaintained, and its XSS advisory has no fix #14
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
waiting-on-julian
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
thehansogroup/eltrix_web#14
Loading…
Add table
Add a link
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?
earmarkis retired on Hex and unmaintained, and its Stored-XSS advisory has no fixed version, so it cannot be bumped and the only remedy is migrating off it.What the instrument says
mix deps.getonmain:introduced: 1.4.1and nofixedevent, so no earmark release closes the CVE.mix deps.update earmarkcannot move within~> 1.4. The only newer things on Hex are1.5.0-prepre-releases of an abandoned package.Why it is not urgent, and why it is still worth doing
earmarkis used at exactly one call site,lib/eltrix_site/policies.ex:51, rendering the operator-authored policy markdown inpriv/policies/*.md. No user input reaches it, so the Stored-XSS-via-attribute-values path is not attacker-reachable here.RETIRED is the reason to move, independent of the CVE. Hex pulled the version and the package is deprecated, which is a supply-chain fact rather than a severity judgement. Somebody reading MEDIUM later would conclude the wrong thing about why this moves.
The work
Migrate
policies.exfromEarmark.as_html!/2to a maintained parser (MDEx is Hex's suggested replacement), swap the dependency inmix.exs, and confirm the rendered policy pages are byte-equivalent or reviewed for the differences. Thenmix deps.getno longer reports a retired dependency.Found while bumping bandit for
jlxq0/mantis#324; recorded there with the reachability.