Please report security problems privately, not in a public issue or pull request.
- Open the repository's Security tab and choose Report a vulnerability. This uses GitHub's private vulnerability reporting: only you and the maintainers see the report.
- If that button is not there, open an issue that says you have a security report and asks for a private contact. Leave out every detail of the problem.
Include the knayi version, where it runs (Node, Bun or a browser), and the smallest input that shows the problem, as code points or as a script that builds it. For a slow input, include how the time grows with the input's length.
- Super-linear running time. Every knayi function must run in time linear in the length of its input. An input on which any public function, or any
fontConvert.debuggingcall, takes quadratic or worse time is a security bug, even when the output is right: a short input can stall a server that processes untrusted text. The same holds for memory that grows faster than the input. It holds for the time knayi spends in the runtime's own functions, too:String.prototype.normalizeputs a long run of combining marks in order in quadratic time, so knayi puts such runs in order itself before it calls it (library/nfc.js). - Loading code it should not. knayi has no runtime dependencies. The only code it loads is the optional
myanmar-toolspackage, and only when a call asks for themyanmartoolsadapter and passes no detector of its own aszawgyiDetector. Onlymain.js, whichrequireandimportload in Node and Bun, loads it: withrequire, from knayi's own folder, as Node and Bun resolve any dependency. The builds indist/, among them the ES module build that bundlers load, and knayi bundled into an app load nothing by name, from the working directory or anywhere else. To load nothing at all, make aZawgyiDetectorfrom the copy ofmyanmar-toolsyou trust and pass it aszawgyiDetector(README, "The myanmar-tools detector"). Up to 2.10.0 the builds looked for the package too: the ES module build under Node from thepackage.jsonof the working directory, so the working directory'snode_modulesdecided which code ran, and the builds from their own file where they had a__filename(under Bun, or loaded withrequire), where Bun's auto-install could fetch the package from npm. Upgrade, or pass azawgyiDetector. A way to make knayi load or run other code is a security bug. - Anything else that lets input to knayi harm the program that calls it.
Wrong output, such as a conversion error, is a bug but not a security problem. Report it in a normal issue.
- The maintainer confirms the problem, works on a fix in private, and agrees a disclosure date with you.
- The fix ships in a patch release of the latest version, labelled as a security fix in CHANGELOG.md and in the GitHub release notes.
- A GitHub security advisory describes the problem once the fix is published, and credits you if you want.
Only the latest release line gets security fixes. Upgrade to the newest patch release to get them.