Security fixes are released for the latest minor version of the current major release.
| Version | Supported |
|---|---|
| 3.2.x | Yes |
| < 3.2 | No |
Do not open a public issue for a security problem.
Report it privately through GitHub's private vulnerability reporting, or by email to development@davils.com.
Please include:
- the affected Kore version, module and JDK,
- a description of the impact — what an attacker gains,
- the steps to reproduce it, ideally as a minimal Kotlin snippet or test,
- any mitigation you are already aware of.
We acknowledge a report within three working days and agree on a disclosure date with you.
Kore is a library: it runs with the privileges of the application that uses it. It treats everything it reads
from outside the program as untrusted: command line arguments, environment variables, values of parameter
sources, version strings, UUIDs, names, data sizes, encoded bytes, serialized documents, text, file paths, the
attributes of principals and everything a library logs through kore-kheck.
The following are in scope:
- input that makes Kore use unbounded memory or CPU, overflow, or crash with an unexpected exception,
- untrusted text that reaches a message, a report, a
toStringor a usage text unescaped, so it can forge log lines or control a terminal, - a value declared as sensitive that appears anywhere outside the value itself,
- a check that passes when it should refuse: an authorization helper of
Principal, a path requirement, a version range or a converter that accepts what it documents as refused, - a weakness in the generation of UUIDs,
- a
NameRule, a decoder ofdecodeTextor a serializer ofkore-serializationthat accepts what it documents as refused, or the process environment revealing a value through itstoString, - a call of a
Loggerofkore-kheckwhose logging throws, rather than the caller's own block, allocates although its level is disabled, or leaves out part of a record beyond itsLimitswithout counting it inLogEvent.omitted, a logger name, field name, marker or value whosetoStringis not escaped, or aLogValue.Secretthat reveals anything about the secret.
The following are not vulnerabilities in Kore:
- a vulnerability in the JDK, the Kotlin standard library,
kotlinx.coroutinesorkotlinx-serialization— report those to the respective project, - an implementation of the
Loggerofkore-kheck, such as kheck, that writes a record unescaped or loses the count of omitted parts — report it to that implementation, - an application that passes a secret to a parameter it did not declare as sensitive, or logs a value it read,
- the time between a path check of a converter and the moment the application opens the file; those checks are documented as advisory,
kore-testingon a production class path; its generators are deterministic by design.
- A format of kotlinx-serialization, such as
Json, may put parts of its raw input into its own exceptions, before a serializer of Kore sees the text. SingleFlighthands one caller's result to every caller of the same key; a key without the identity of the caller shares results across principals.- Kore has no type that holds a secret. A sensitive parameter returns its plain value; the application keeps it out of its own logs.
- A UUID of version 7 reveals the time it was created and carries fewer random bits than one of version 4. Never use a UUID as a capability or a token.
@DavilsInternalis a compile-time opt-in, not an access boundary. Kotlininternalis public in JVM bytecode: Java code and reflection reach internal declarations through their mangled names. On the module path themodule-infoofkore-coreexports only packages with public API, and implementation details live in packages it does not export; on the class path every class is reachable. Kore therefore validates in every constructor and keeps no secret in any field, internal ones included.kore-kheckescapes what its owntoStringshows, but a record reaches a sink through an implementation ofLogger, which escapes it there.LogEvent.causekeeps the throwable as it was given; itstoStringshows only the type, while an implementation decides what of its message and stack it writes.LoggerName.boundedshortens a name toMAX_NAME_LENGTHcode units and may split a surrogate pair; the lone surrogate is escaped where it is shown.LoggerName.ofandLoggerName.boundedshorten rather than refuse, so two names that share their firstMAX_NAME_LENGTHcode units become one name and their records merge into one logger, with one level; a name an attacker chooses that long can pose as another logger whose name is as long.LogValue.ItemsandLogValue.Entrieskeep their hash code, butequalsof two values built apart from each other whose parts are shared, the same list or group held many times over, can take time exponential in their depth, because equal parts are compared again wherever they occur. A builtLogEventis not affected: its values are bounded byLimits.MAX_VALUES, so comparing events stays bounded. Code should not compare standalone values without bounds, such as values built from input outside an event.- On Wasm the hash tables of Kotlin probe linearly, so keys that share one hash code, such as the strings
AaandBBand their concatenations, make aHashMap, aHashSetand every copy that hashes its keys, such asorderedCopy, slow down with the square of their number: 16,384 such keys took about 1.3 seconds where the JVM, whose tables turn long chains of comparable keys into trees, took 5 milliseconds. Where an attacker chooses many keys on Wasm, bound their number first or useOrderedMap, which compares keys instead of hashing them. - Escapes are written as
\u{XXXX},\n,\rand\t. A literal backslash in free text is shown as it is, so input can display text that looks like an escape, but never a real control character. Right-to-left letters are shown as they are; a viewer may reorder the neutral characters around them.
Releases are published to https://repo.davils.com/releases and signed with the release key of Davils; its
fingerprint is published in this section with the first release, so a consumer can pin it as a trusted-key in its
own gradle/verification-metadata.xml. A release also carries a signed build provenance attestation made by the
GitHub Actions run that built it:
gh attestation verify kore-core-jvm-2.5.2.jar --repo davils-com/kore --signer-repo davils-com/kotlin-workflowSnapshots in https://repo.davils.com/snapshots are neither signed nor attested and are not meant for production.