Kestrel
대시보드로 돌아가기
CVE-2026-53541MEDIUM· 4.3GHSA대응게시일: 2026. 06. 24.수정일: 2026. 06. 24.

OliveTin has Unvalidated `ot_`-prefixed Arguments that Bypass Input Filtering

위협 신호 · CVSS · EPSS · KEV

정기 패치· 높은 악용 신호 없음
CVSS
4.3medium

이론적 심각도 점수

EPSS

예측 데이터 없음

KEV
미등재

실측 악용 기록 없음

권장 대응 기한60일 이내CISA SSVC 기준

계획된 패치 주기 내 조치(60일 이내)

외부 노출· KEV 미등재 · 자동화 어려움 · 부분 영향 · 외부 노출

CVSS 벡터 · 메트릭

악용 경로
공격 벡터네트워크
공격 복잡도낮음
필요 권한낮음
사용자 상호작용불필요
범위불변
영향
기밀성 영향없음
무결성 영향낮음
가용성 영향없음
버전별 점수
CVSS 3.14.3MODERATE
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:L/A:N

상세 설명

Description

The filterToDefinedArgumentsOnly function in the executor is intended to discard any arguments not explicitly defined in the action's configuration. However, a special case allows any argument whose name starts with ot_ to bypass this filter. While two system arguments (ot_executionTrackingId and ot_username) are injected by OliveTin and overridden, all other ot_-prefixed arguments supplied by the user pass through unmodified.

These bypassed arguments are:

  1. Not type-checked — the validation loop only iterates over the action's defined arguments, so ot_-prefixed arguments skip all type safety checks entirely.
  2. Set as environment variables — via buildEnv(), with completely unvalidated values, and passed to the executed command.
  3. Included in the template context — available as .Arguments.ot_* in template rendering.

Affected Code

Filter bypass — service/internal/executor/executor.go (lines 728–731):

text
1func keepArgument(name string, definedNames map[string]struct{}) bool {
2 _, ok := definedNames[name]
3 return ok || strings.HasPrefix(name, "ot_")
4}

System args only override two keys — service/internal/executor/executor.go (lines 742–745):

text
1func injectSystemArgs(req *ExecutionRequest) {
2 req.Arguments["ot_executionTrackingId"] = req.TrackingID
3 req.Arguments["ot_username"] = req.AuthenticatedUser.Username
4}

Any other ot_-prefixed argument (e.g., ot_malicious) survives both functions.

Unvalidated values become environment variables — service/internal/executor/executor.go (lines 867–882):

text
1func buildEnv(args map[string]string) []string {
2 ret := append(os.Environ(), "OLIVETIN=1")
3 for k, v := range args {
4 varName := fmt.Sprintf("%v", strings.TrimSpace(strings.ToUpper(k)))
5 if varName == "" { continue }
6 ret = append(ret, fmt.Sprintf("%v=%v", varName, v))
7 }
8 return ret
9}

The value v is never validated. It can contain newlines, shell metacharacters, null bytes, or any arbitrary data.

Proof of Concept

An attacker sends a StartAction request with extra ot_-prefixed arguments:

text
1{
2 "bindingId": "<any-action-id>",
3 "arguments": [
4 { "name": "ot_custom_var", "value": "arbitrary unvalidated content \n with newlines" },
5 { "name": "ot_another", "value": "$(whoami)" }
6 ]
7}

These arguments:

  • Pass through filterToDefinedArgumentsOnly (the ot_ prefix exempts them).
  • Are never type-checked (not in the action's argument definitions).
  • Become environment variables OT_CUSTOM_VAR and OT_ANOTHER in the executed command's environment.
  • Are available in the template rendering context as .Arguments.ot_custom_var and .Arguments.ot_another.

Impact

  • Environment variable pollution — attacker can set arbitrary environment variables (with OT_ uppercased prefix) in the execution environment of any action they can trigger. Scripts or programs that read custom environment variables could be influenced.
  • Potential for secondary exploitation — if any executed script or command reads OT_-prefixed environment variables, the unvalidated content could cause unexpected behavior.
  • Template context pollution — although Go's text/template does not recursively evaluate data values (mitigating direct template injection), the extra arguments are accessible in the template context and could interact unexpectedly with custom template logic.

Suggested Fix

Remove the ot_ prefix exception from keepArgument, or restrict it to only the two known system arguments:

text
1var systemArgs = map[string]struct{}{
2 "ot_executionTrackingId": {},
3 "ot_username": {},
4}
5
6func keepArgument(name string, definedNames map[string]struct{}) bool {
7 _, isDefined := definedNames[name]
8 _, isSystem := systemArgs[name]
9 return isDefined || isSystem
10}

Discovery Methodology

Both vulnerabilities were identified through manual source code review of the OliveTin repository, focusing on:

  • Input validation boundaries (API request fields flowing into file system operations and execution contexts)
  • Argument filtering and type-checking logic in the executor
  • File path construction in the log persistence feature

No automated scanners or fuzzing tools were used. The review was conducted against the current main branch source code.


AI 심층 분석

공격 시나리오 · 재현 가능한 PoC 페이로드 · 즉시 적용 가능한 차단 패치를 한 번에 받아 보세요. 보안 운영팀이 그대로 점검·티켓팅에 쓸 수 있는 형태로 정리해 드립니다.